|
@@ -97,11 +97,13 @@ public class ContentDeconstructionClient {
|
|
|
.addHeader("Content-Type", "application/json")
|
|
.addHeader("Content-Type", "application/json")
|
|
|
.addHeader("Accept", "application/json")
|
|
.addHeader("Accept", "application/json")
|
|
|
.build();
|
|
.build();
|
|
|
|
|
+ log.info("submitDeconstructionTask deconstructionTaskSubmitUrl= {} param = {}", deconstructionTaskSubmitUrl, JSON.toJSONString(param));
|
|
|
try (Response response = client.newCall(request).execute()) {
|
|
try (Response response = client.newCall(request).execute()) {
|
|
|
if (!response.isSuccessful()) {
|
|
if (!response.isSuccessful()) {
|
|
|
throw new HttpServiceException(ExceptionEnum.HTTP_REQUEST_ERROR.getCode(), "code: " + response.code() + ", msg: " + response.message());
|
|
throw new HttpServiceException(ExceptionEnum.HTTP_REQUEST_ERROR.getCode(), "code: " + response.code() + ", msg: " + response.message());
|
|
|
}
|
|
}
|
|
|
String respBody = response.body().string();
|
|
String respBody = response.body().string();
|
|
|
|
|
+ log.info("submitDeconstructionTask respBody = {}", respBody);
|
|
|
// 5. 反序列化返回值
|
|
// 5. 反序列化返回值
|
|
|
ApiResponse<SubmitResponseDataDTO> apiResponse = JSON.parseObject(respBody, new TypeReference<ApiResponse<SubmitResponseDataDTO>>() {
|
|
ApiResponse<SubmitResponseDataDTO> apiResponse = JSON.parseObject(respBody, new TypeReference<ApiResponse<SubmitResponseDataDTO>>() {
|
|
|
});
|
|
});
|
|
@@ -124,11 +126,13 @@ public class ContentDeconstructionClient {
|
|
|
.addHeader("Content-Type", "application/json")
|
|
.addHeader("Content-Type", "application/json")
|
|
|
.addHeader("Accept", "application/json")
|
|
.addHeader("Accept", "application/json")
|
|
|
.build();
|
|
.build();
|
|
|
|
|
+ log.info("getVideoInfo longVideoApiVideoInfoGetUrl= {} param = {}", longVideoApiVideoInfoGetUrl, JSON.toJSONString(videoInfoGetParam));
|
|
|
try (Response response = client.newCall(request).execute()) {
|
|
try (Response response = client.newCall(request).execute()) {
|
|
|
if (!response.isSuccessful()) {
|
|
if (!response.isSuccessful()) {
|
|
|
throw new HttpServiceException(ExceptionEnum.HTTP_REQUEST_ERROR.getCode(), "code: " + response.code() + ", msg: " + response.message());
|
|
throw new HttpServiceException(ExceptionEnum.HTTP_REQUEST_ERROR.getCode(), "code: " + response.code() + ", msg: " + response.message());
|
|
|
}
|
|
}
|
|
|
String respBody = response.body().string();
|
|
String respBody = response.body().string();
|
|
|
|
|
+ log.info("getVideoInfo respBody = {}", longVideoApiVideoInfoGetUrl, respBody);
|
|
|
// 5. 反序列化返回值
|
|
// 5. 反序列化返回值
|
|
|
JsonView<WxVideoV2VO> jsonView = JSON.parseObject(respBody, new TypeReference<JsonView<WxVideoV2VO>>() {
|
|
JsonView<WxVideoV2VO> jsonView = JSON.parseObject(respBody, new TypeReference<JsonView<WxVideoV2VO>>() {
|
|
|
});
|
|
});
|