diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderBasicInfoServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderBasicInfoServiceImpl.java index fe16623bd..ab7bdfe34 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderBasicInfoServiceImpl.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderBasicInfoServiceImpl.java @@ -891,6 +891,13 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService { } // 修改保险订单表的退款状态 OrderInsuranceInfo insuranceInfo = orderInsuranceInfoService.getInsuranceInfoByOrderCode(orderBasicInfo.getOrderCode()); + if (insuranceInfo == null) { + // 新增一条数据 + insuranceInfo = OrderInsuranceInfo.builder() + .orderCode(orderBasicInfo.getOrderCode()) + .tradeAmount(insuranceAmount) + .build(); + } insuranceInfo.setRefundStatus(Constants.ONE); orderInsuranceInfoService.updateOrderInsuranceInfo(insuranceInfo); }