|
|
@@ -73,7 +73,7 @@ public class InsuranceHandler implements TradeOrderHandler{
|
|
|
}
|
|
|
TradeVisitorBO holder = visitorDOList.get(0);
|
|
|
InsuranceApplyReqDTO reqDTO = new InsuranceApplyReqDTO();
|
|
|
-// reqDTO.setOrderId(tradeOrderDO.getId());
|
|
|
+ reqDTO.setOrderId(tradeOrderDO.getId());
|
|
|
// reqDTO.setAmount(MapUtil.get(insuranceProduct,"insurance_amount", BigDecimal.class));
|
|
|
// reqDTO.setPremium(MapUtil.get(insuranceProduct,"num", BigDecimal.class));
|
|
|
// reqDTO.setRationType(MapUtil.get(insuranceProduct,"insurance_code", String.class));
|
|
|
@@ -86,8 +86,10 @@ public class InsuranceHandler implements TradeOrderHandler{
|
|
|
|
|
|
int insureFlag = 1;
|
|
|
for (InsuranceApplyReqDTO reqDTO : dataList) {
|
|
|
- InsuredRespDTO insuredRespDTO = insuranceApi.applyInsurance(reqDTO).getCheckedData();
|
|
|
- if(ObjectUtils.equalsAny(insuredRespDTO.getInsuranceStatus() , InsuranceStatusEnum.INSURE.getValue(),InsuranceStatusEnum.FAIL.getValue(),InsuranceStatusEnum.CANCELLED.getValue())){
|
|
|
+ log.error("投保参数{}",reqDTO);
|
|
|
+ boolean res = insuranceApi.applyInsurance(reqDTO).getCheckedData();
|
|
|
+ log.error("投保请求返回{}",res);
|
|
|
+ if(!res){
|
|
|
insureFlag = 0;
|
|
|
}
|
|
|
}
|