Parcourir la source

添加泰康 调整 initQuotation 接口为 initQuotationFlag1 添加 initQuotationFlag2 接口

wlq il y a 1 an
Parent
commit
8618eed55e

+ 33 - 1
tenant/insurance/quotation-taikang/src/main/java/com/jzg/quotation/taikang/service/TaiKangHttpService.java

@@ -543,7 +543,39 @@ public class TaiKangHttpService {
      *
      * @return
      */
-    public InitQuotationResult initQuotation(String tplatformId, String orderId) {
+    public InitQuotationResult initQuotationFlag1(String tplatformId, String orderId) {
+        InitQuotationParam param = new InitQuotationParam();
+        param.setChannelCode("OffWeb");
+        param.setOrderID(orderId);
+        param.setInitFlag("1");
+
+        HttpHeaders httpHeaders = new HttpHeaders();
+        httpHeaders.add("tkCarRequestToken", token());
+
+        StringResponse response = client.request(HttpURL.initQuotation, param, httpHeaders, StringResponse.class);
+
+        checkResponseUnknownField(response);
+
+        // 解密
+        String json = AESDecryptor.decrypt(response.getData());
+
+        if (logger.isInfoEnabled()) {
+            logger.info("TaiKangHttpClient initQuotation decrypt body: {}", json);
+        }
+
+        InitQuotationResult.Response response1 = JsonUtil.readObjcet(json, InitQuotationResult.Response.class);
+
+        checkResponseUnknownField(response1);
+
+        return response1.getData();
+    }
+
+    /**
+     *
+     *
+     * @return
+     */
+    public InitQuotationResult initQuotationFlag2(String tplatformId, String orderId) {
         InitQuotationParam param = new InitQuotationParam();
         param.setChannelCode("OffWeb");
         param.setOrderID(orderId);

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
tenant/insurance/quotation-taikang/src/test/java/com/jzg/quotation/taikang/AESDecryptorTest.java


Fichier diff supprimé car celui-ci est trop grand
+ 9 - 0
tenant/insurance/quotation-taikang/src/test/java/com/jzg/quotation/taikang/entity/InitQuotationResultTest.java


+ 2 - 2
tenant/insurance/quotation-taikang/src/test/java/com/jzg/quotation/taikang/service/TaiKangHttpServiceTest1.java

@@ -929,7 +929,7 @@ public class TaiKangHttpServiceTest1 {
 
     @Test
     @Order(15)
-    public void initQuotation() {
+    public void initQuotationFlag1() {
         // feda77e829d4dedbbd8b4e236bacfac5
         String tplatformId = TaiKangHttpServiceTest1.loginResult.getTplatformId();
 
@@ -946,7 +946,7 @@ public class TaiKangHttpServiceTest1 {
 
 
 
-        InitQuotationResult result = taiKangHttpService.initQuotation(tplatformId, "WBPC202503071419220680000");
+        InitQuotationResult result = taiKangHttpService.initQuotationFlag1(tplatformId, "WBPC202503071419220680000");
 
         assertNotNull(result);
 

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff