Commit 7b07ef94 authored by hezhen's avatar hezhen

Merge branch 'feature_chw_zjw' into dev-chw

parents 463552c3 f6576e6c
......@@ -220,9 +220,12 @@ public class BaseOrderAcceptDetailedBiz extends BaseBiz<BaseOrderAcceptDetailedM
public void addInsure(OrderDetailDTO orderDetailDTO,Integer status){
BigDecimal insureAmount = orderDetailDTO.getInsureAmount() == null ? BigDecimal.ZERO : orderDetailDTO.getInsureAmount();
log.info("-----保险分账---insureAmount===="+insureAmount);
if (insureAmount.compareTo(BigDecimal.ZERO) > 0){
Integer type = status == 1 ? 2 : 1;
BaseOrderAcceptDetailed acceptDetailed=new BaseOrderAcceptDetailed();
acceptDetailed.setMchId(0);
acceptDetailed.setUserId(orderDetailDTO.getUserId());
acceptDetailed.setOrderNo(orderDetailDTO.getOrderNo());
acceptDetailed.setOrderId(orderDetailDTO.getOrderId());
acceptDetailed.setOrderAmount(orderDetailDTO.getOrderAmount());
......
......@@ -47,6 +47,11 @@ public class WaterMQHandler {
@RabbitListener(queues = ORDER_WATER_QUEUE)
public void integralHandler(Message message, @Headers Map<String, Object> headers, Channel channel) {
log.info("分账队列 messageJson:"+ JSONUtil.parse(message));
try {
Thread.sleep(2000L);
}catch (Exception e) {
log.error(e.getMessage(), e);
}
ExecutorService executorService = Executors.newCachedThreadPool();
executorService.execute(new Runnable() {
@Override
......
......@@ -854,8 +854,11 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper, BaseOrder> implements
}});
//更新 申请状态
insuranceList.forEach( insurance -> {
insurance.setStatus(STATUS_PAY);
insurance.setPayTime(DateUtil.date().getTime());
orderPersonInsuranceBiz.updateSelectiveById(new OrderPersonInsurance(){{
setId(insurance.getId());
setStatus(STATUS_PAY);
setPayTime(DateUtil.date().getTime());
}});
});
}
} finally {
......
......@@ -314,8 +314,11 @@ public class OrderCancelBiz {
baseOrder.setInsureStatus(BaseOrder.INSURE_STATUS_CNL);
//更新 申请状态
insuranceList.forEach( insurance -> {
insurance.setStatus(STATUS_CNL);
insurance.setRefundTime(DateUtil.date().getTime());
orderPersonInsuranceBiz.updateSelectiveById(new OrderPersonInsurance(){{
setId(insurance.getId());
setStatus(STATUS_CNL);
setRefundTime(DateUtil.date().getTime());
}});
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment