|
@@ -127,7 +127,7 @@ public class InsuranceServiceImpl implements InsuranceService {
|
|
|
*/
|
|
*/
|
|
|
@Override
|
|
@Override
|
|
|
@Transactional
|
|
@Transactional
|
|
|
- public void applyInsurance(Long orderId) {
|
|
|
|
|
|
|
+ public boolean applyInsurance(Long orderId) {
|
|
|
|
|
|
|
|
TradeOrderRespVO orderInfo = tradeOrderMapper.getOrderInfo(orderId);
|
|
TradeOrderRespVO orderInfo = tradeOrderMapper.getOrderInfo(orderId);
|
|
|
VoyageDO voyage = voyageService.getVoyage(orderInfo.getVoyageId());
|
|
VoyageDO voyage = voyageService.getVoyage(orderInfo.getVoyageId());
|
|
@@ -166,7 +166,7 @@ public class InsuranceServiceImpl implements InsuranceService {
|
|
|
//被保人对象列表, 其下可多位被保险人, 他们在同个订单下
|
|
//被保人对象列表, 其下可多位被保险人, 他们在同个订单下
|
|
|
List<TradeVisitorRespVO> tradeVisitorRespVOS = tradeVisitorMapper.queryVisitorByOrderId(orderId);
|
|
List<TradeVisitorRespVO> tradeVisitorRespVOS = tradeVisitorMapper.queryVisitorByOrderId(orderId);
|
|
|
List<InsuredDTO> insuredList = new ArrayList<>();
|
|
List<InsuredDTO> insuredList = new ArrayList<>();
|
|
|
- tradeVisitorRespVOS.stream().forEach(tradeVisitorRespVO -> {
|
|
|
|
|
|
|
+ tradeVisitorRespVOS.forEach(tradeVisitorRespVO -> {
|
|
|
InsuredDTO insuredDTO = new InsuredDTO();
|
|
InsuredDTO insuredDTO = new InsuredDTO();
|
|
|
insuredDTO.setExternalPolicyNumber(tradeVisitorRespVO.getId().toString());
|
|
insuredDTO.setExternalPolicyNumber(tradeVisitorRespVO.getId().toString());
|
|
|
insuredDTO.setInsuredName(tradeVisitorRespVO.getName());
|
|
insuredDTO.setInsuredName(tradeVisitorRespVO.getName());
|
|
@@ -205,6 +205,7 @@ public class InsuranceServiceImpl implements InsuranceService {
|
|
|
insuranceMapper.insert(insuranceDO);
|
|
insuranceMapper.insert(insuranceDO);
|
|
|
// 发送查询投保接口通知
|
|
// 发送查询投保接口通知
|
|
|
tradePublishUtils.publishInsuranceQueryMsg(orderInfo.getOrderNo(),0);
|
|
tradePublishUtils.publishInsuranceQueryMsg(orderInfo.getOrderNo(),0);
|
|
|
|
|
+ return true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|