Ver Fonte

国任报价修改

wks há 2 anos atrás
pai
commit
49c5e33b6b

+ 7 - 1
src/main/java/com/ydtech/modules/order/components/gouren/GuorenRequestApiComponent.java

@@ -75,6 +75,12 @@ public class GuorenRequestApiComponent {
             throw new SystemException(message + "接口请求失败");
         }
 
+        JSONObject jsonObject = JSON.parseObject(body1);
+        Object responseBody = jsonObject.get("RESPONSE_BODY");
+        if(responseBody instanceof String){
+            throw new SystemException((String) responseBody);
+        }
+
         return JSON.parseObject(body1, new TypeReference<ResponseDto<JSONObject>>() {
         });
     }
@@ -100,7 +106,7 @@ public class GuorenRequestApiComponent {
     /**
      * 投保单保存
      */
-    public InsuranceSlipResp insuranceSlip(BaseQuoteInfoVo yaQuoteInfoVo, String carPriceNum, String orderCode,  List<GuoRenSpecialAgreementVo> specialAgreementVo) {
+    public InsuranceSlipResp insuranceSlip(BaseQuoteInfoVo yaQuoteInfoVo, String carPriceNum, String orderCode, List<GuoRenSpecialAgreementVo> specialAgreementVo) {
         //构造请求参数
         InsuranceSlipReq req = InsuranceSlipReq.buildParam(yaQuoteInfoVo, carPriceNum, orderCode, specialAgreementVo);
         return request(req, PlatformInterfaceCode.API_IIRBT00006, InsuranceSlipResp.class);