supeng 1 nedēļu atpakaļ
vecāks
revīzija
d7e1db277d

+ 4 - 0
supply-demand-engine-core/src/main/java/com/tzld/piaoquan/sde/integration/ContentDeconstructionClient.java

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

+ 23 - 0
supply-demand-engine-job/src/test/java/com/tzld/piaoquan/sde/ContentDeconstructionClientTest.java

@@ -0,0 +1,23 @@
+package com.tzld.piaoquan.sde;
+
+import com.tzld.piaoquan.sde.integration.ContentDeconstructionClient;
+import com.tzld.piaoquan.sde.mapper.SdExecutionTaskMapper;
+import com.tzld.piaoquan.sde.model.entity.SdExecutionTask;
+import org.junit.jupiter.api.Test;
+import org.springframework.beans.factory.annotation.Autowired;
+
+public class ContentDeconstructionClientTest extends BaseTest {
+
+    @Autowired
+    private ContentDeconstructionClient contentDeconstructionClient;
+
+    @Autowired
+    private SdExecutionTaskMapper sdExecutionTaskMapper;
+
+    @Test
+    public void testDeconstruction() {
+        SdExecutionTask sdExecutionTask = sdExecutionTaskMapper.selectById(1);
+        contentDeconstructionClient.submitDeconstructionTask(sdExecutionTask);
+    }
+
+}