Quellcode durchsuchen

调整泰康核保日志打印位置

wangrq vor 3 Wochen
Ursprung
Commit
a813d466b5

+ 9 - 2
tenant/insurance/quotation-taikang/src/main/java/com/jzg/quotation/taikang/crawler/service/TKHttpAPIService.java

@@ -647,7 +647,7 @@ public class TKHttpAPIService {
 
         HttpHeaders httpHeaders = new HttpHeaders();
         httpHeaders.add("tkCarRequestToken", token);
-
+        log.info("开始调用 preciseInitToVipQuote(核保),param={}", JSONObject.toJSONString(param));
         StringResponse response = client.request(HttpURL.preciseInit, param, httpHeaders, StringResponse.class);
         checkResponseUnknownField(response);
         return decrypt(response, PreciseInitResult.class);
@@ -905,8 +905,9 @@ public class TKHttpAPIService {
         param.setInsureInfo(insureInfo);
         param.setAuthFailContinueFlag("");
         param.setChannelEngages(new ArrayList<>());
-
+        log.info("开始调用 entranceFor000012,param={}", JSONObject.toJSONString(param));
         EntranceResult.Response response = entranceForJson(token, param, "000012", EntranceResult.Response.class);
+        log.info("完成 entranceFor000012 调用,response={}", JSONObject.toJSONString(response));
         return response.getData();
     }
 
@@ -951,12 +952,14 @@ public class TKHttpAPIService {
         param.setLeadsid("");
         param.setChannelEngages(new ArrayList<>());
 
+        log.info("开始调用 entranceFor000038,param={}", JSONObject.toJSONString(param));
         TKEntranceFor000038Result.Response response = entranceForDecrypt(token, param, "000038", TKEntranceFor000038Result.Response.class);
         // if (response.getStatus() != 1) {
         //     throw new SystemException(response.getMessage());
         // }
 
         checkResponseUnknownField(response);
+        log.info("完成 entranceFor000038 调用,response={}", JSONObject.toJSONString(response));
         return response;
     }
 
@@ -1212,8 +1215,10 @@ public class TKHttpAPIService {
         httpHeaders.add("tkCarRequestToken", token);
         httpHeaders.add("Actiontype", "000021");
 
+        log.info("开始调用 entranceFor000021(支付链接预处理),param={}", JSONObject.toJSONString(param));
         StringResponse response = client.request(HttpURL.entrance, param, httpHeaders, StringResponse.class);
         TKEntranceFor000021Result.Response decrypt = decrypt(response, TKEntranceFor000021Result.Response.class);
+        log.info("调用 entranceFor000021 完成,tkEntranceFor000021Result={}", JSONObject.toJSONString(decrypt));
         return decrypt.getData();
     }
 
@@ -1245,8 +1250,10 @@ public class TKHttpAPIService {
         httpHeaders.add("Actiontype", "000052");
         httpHeaders.add("grayFlag", "pro");
 
+        log.info("开始调用 entranceFor000052,param={}", JSONObject.toJSONString(param));
         StringResponse response = client.request(HttpURL.entrance, param, httpHeaders, StringResponse.class);
         TKEntranceFor000052Result.Response decrypt = decrypt(response, TKEntranceFor000052Result.Response.class);
+        log.info("调用 entranceFor000052 完成,tkEntranceFor000052Result={}", JSONObject.toJSONString(decrypt));
         return decrypt.getData();
     }
 

+ 0 - 8
tenant/insurance/quotation-taikang/src/main/java/com/jzg/quotation/taikang/crawler/service/TKSimpleService.java

@@ -1,9 +1,7 @@
 package com.jzg.quotation.taikang.crawler.service;
 
-import com.alibaba.fastjson.JSONObject;
 import com.jzg.commons.entity.orders.po.InsOrdersCarUserInfo;
 import com.jzg.commons.entity.quote.vo.*;
-
 import com.jzg.quotation.commons.filter.CarModelsFilterUtils;
 import com.jzg.quotation.taikang.crawler.CodeUtil;
 import com.jzg.quotation.taikang.crawler.ConvertUtil;
@@ -1197,22 +1195,16 @@ public class TKSimpleService {
         log.info("orderSubmit 会话参数已就绪,mainOrderId={}, tplatformId={}, fromId={}", mainOrderId, tplatformId, fromId);
 
         // 步骤1:调用 entranceFor000012(核保前置接口)
-        log.info("orderSubmit 开始调用 entranceFor000012,mainOrderId={}", mainOrderId);
         httpService.entranceFor000012(token, tplatformId, fromId, mainOrderId, insureInfo);
-        log.info("orderSubmit entranceFor000012 调用完成,mainOrderId={}", mainOrderId);
 
         // 步骤2:调用 preciseInitToVipQuote(核保报价接口),返回核保报价结果
-        log.info("orderSubmit 开始调用 preciseInitToVipQuote(核保),mainOrderId={}", mainOrderId);
         PreciseInitResult preciseQuoteResult = httpService.preciseInitToVipQuote(token, tplatformId, tplatLoginKey, mainOrderId, insureInfo);
-        log.info("orderSubmit preciseInitToVipQuote(核保)调用完成,preciseQuoteResult={}", JSONObject.toJSONString(preciseQuoteResult));
         if (preciseQuoteResult == null) {
             throw new RuntimeException("HttpService#preciseInitToQuote (核保)失败!");
         }
 
         // 步骤3:调用 entranceFor000038,获取核保结果
-        log.info("orderSubmit 开始调用 entranceFor000038,mainOrderId={}", mainOrderId);
         TKEntranceFor000038Result.Response tkEntranceFor000038Result = httpService.entranceFor000038(token, tplatformId, fromId, mainOrderId);
-        log.info("orderSubmit entranceFor000038 调用完成,tkEntranceFor000038Result={}", JSONObject.toJSONString(tkEntranceFor000038Result));
 
         // 方法出口日志:标记整个流程执行结束
         log.info("orderSubmit 执行完成,mainOrderId={}", mainOrderId);

+ 1 - 4
tenant/insurance/quotation-taikang/src/main/java/com/jzg/quotation/taikang/crawler/service/impl/TKQuotationBaseServiceImpl.java

@@ -187,6 +187,7 @@ public class TKQuotationBaseServiceImpl implements TKQuotationBaseService {
         InsOrdersCarUserInfo insOrdersCarUserInfo = insOrdersCarUserInfoList.get(0);
         TKInsureInfo insureInfo = tkSimpleService.dataCreateInsureInfo(initProposalResult, insOrdersCarUserInfo);
         log.info("车主信息:{}", new Gson().toJson(insureInfo));
+
         // # 车险投保单报价下单
         TKEntranceFor000038Result.Response tkEntranceFor000038Result = tkSimpleService.orderSubmit(session, preciseInitResult.getMainOrderId(), insureInfo);
         UnderwritingResultsVo underwritingResultsVo = new UnderwritingResultsVo();
@@ -198,14 +199,10 @@ public class TKQuotationBaseServiceImpl implements TKQuotationBaseService {
         }
 
         // 调用 entranceFor000021,为获取支付链接做预处理 TODO
-        log.info("orderSubmit 开始调用 entranceFor000021(支付链接预处理),mainOrderId={}", preciseInitResult.getMainOrderId());
         TKEntranceFor000021Result tkEntranceFor000021Result = httpService.entranceFor000021(session.getToken(), session.getFromid(), preciseInitResult.getMainOrderId());
-        log.info("orderSubmit entranceFor000021 调用完成,tkEntranceFor000021Result={}", JSONObject.toJSONString(tkEntranceFor000021Result));
 
         // 调用 entranceFor000052,基于核保结果做后续处理
-        log.info("orderSubmit 开始调用 entranceFor000052,mainOrderId={}", preciseInitResult.getMainOrderId());
         TKEntranceFor000052Result tkEntranceFor000052Result = httpService.entranceFor000052(session.getToken(), tkEntranceFor000038Result.getData());
-        log.info("orderSubmit entranceFor000052 调用完成,tkEntranceFor000052Result={}", JSONObject.toJSONString(tkEntranceFor000052Result));
 
         // 获取核保返回数据
         TKOrderData tkOrderData = tkEntranceFor000038Result.getData().getData();