| | |
| | | throw new FebsException("订单不存在"); |
| | | } |
| | | |
| | | if (OrderStatusEnum.WAIT_PAY.getValue() != orderInfo.getStatus()) { |
| | | throw new FebsException("订单不是待付款, 无法取消"); |
| | | if (OrderStatusEnum.WAIT_PAY.getValue() != orderInfo.getStatus() |
| | | && OrderStatusEnum.WAIT_SHIPPING.getValue() != orderInfo.getStatus() ) { |
| | | throw new FebsException("订单不是待付款或者待收货, 无法取消"); |
| | | } |
| | | |
| | | orderInfo.setStatus(OrderStatusEnum.CANCEL.getValue()); |
| | |
| | | orderInfo.setReceivingTime(new Date()); |
| | | this.baseMapper.updateById(orderInfo); |
| | | //普通订单才产生积分,积分订单不产生积分 |
| | | if(1 == orderInfo.getOrderType()){ |
| | | agentProducer.sendGetScoreMsg(orderInfo.getId()); |
| | | } |
| | | // if(1 == orderInfo.getOrderType()){ |
| | | // agentProducer.sendGetScoreMsg(orderInfo.getId()); |
| | | // } |
| | | //生成一条团长提成记录 |
| | | // Long orderInfoId = orderInfo.getId(); |
| | | // List<MallOrderItem> mallOrderItemList = mallOrderItemMapper.selectListByOrderId(orderInfoId); |