Просмотр исходного кода

[深爱]科目基础资料对接测试

zxl 1 месяц назад
Родитель
Сommit
2e9b7e7497

+ 6 - 3
src/main/java/com/uas/eis/service/Impl/RequestSTKServiceImpl.java

@@ -291,7 +291,7 @@ public class RequestSTKServiceImpl implements RequestSTKService {
     }
 
     @Override
-    public HttpResultResponse updateKSPostParam(Integer page, Integer size, UpdateCustVendDTO dto) throws Exception {
+    public HttpResultResponse updateKSPostParam(Integer page, Integer size, List<SaveOrChangeCustomerDetailDto> dtos) throws Exception {
         //时间戳
         String timestamp = Long.toString(System.currentTimeMillis());
 
@@ -301,17 +301,20 @@ public class RequestSTKServiceImpl implements RequestSTKService {
         request.put("size",size);
 
         //传入参数  此处案例仅放置了时间,可自行添加
-        JSONObject param=new JSONObject();
+        //JSONObject param=new JSONObject();
         //param.put("UPDATE_TIME_start","2024-05-09 14:24:06");
         //param.put("UPDATE_TIME_end","2024-05-09 15:01:28");
         //param.put("TASKNO","P2022032200000041");
         //param.put("TASKCODE","202409");
 
 
-        request.put("param",dto);
+        request.put("param",dtos);
 
         String content = request.toString();
 
+
+        log.info("修改客商信息入参content:{}",content);
+
         //加签方法第一个参数
         StringBuilder signBuilder = new StringBuilder("appid").append("=").append(STK_APP_ID).append("&")
                 .append(content).append("&")

+ 9 - 2
src/main/java/com/uas/eis/service/Impl/STKServiceImpl.java

@@ -188,8 +188,15 @@ public class STKServiceImpl implements STKService {
             }
         }
         //调用深投控api接口
-        SaveOrChangeCustomerVo saveOrChangeCustomerVo = requestSTKService.saveOrChangeCustomer(sourceDataList);
-        return null;
+        SaveOrChangeCustomerVo saveOrChangeCustomerVo = null;
+        try {
+            HttpResultResponse resultResponse = requestSTKService.updateKSPostParam(1,200,sourceDataList);
+            saveOrChangeCustomerVo = JSONObject.parseObject(resultResponse.getBody(),SaveOrChangeCustomerVo.class);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        ApiResult result = new ApiResult();
+        return result.setData(saveOrChangeCustomerVo);
     }
 
 

+ 1 - 1
src/main/java/com/uas/eis/service/RequestSTKService.java

@@ -56,7 +56,7 @@ public interface RequestSTKService {
     /**
      * post请求(修改客商)
      * */
-    HttpResultResponse updateKSPostParam(Integer page, Integer size, UpdateCustVendDTO dto) throws Exception;
+    HttpResultResponse updateKSPostParam(Integer page, Integer size, List<SaveOrChangeCustomerDetailDto> dtos) throws Exception;