Commit d01fe432 by 吕明尚

Merge remote-tracking branch 'origin/dev' into dev

parents 8919d477 a6f06a02
......@@ -370,6 +370,9 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
// if (request.getAmount().compareTo(BigDecimal.ZERO) <= 0) {
// throw new BaseException("退款金额不能为0,请修改退款金额");
// }
// 当前订单状态
Integer status = sOrder.getStatus();
// 退款记录
OrderRefundArtificial artificial = new OrderRefundArtificial();
artificial.setIsRefundCoupon(request.getRefundCoupon());
artificial.setIsClean(request.getIsClean());
......@@ -420,6 +423,11 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
sOrder.setRefundReason(request.getRefundReason());
this.updateById(sOrder);
}
if (OrderStatusEnum.USED.getCode().equals(status)) {
// 使用中订单断电, 延时3分钟断电
deviceOpService.openOrCloseDevice(sOrder.getRoomId(), sOrder.getConsumerPhone(),
OpTypeEnum.CUT_ELECTRIC.getCode(), true, 180);
}
// 生成退款人工退款记录
return orderRefundArtificialService.insertOrderRefundArtificial(artificial);
}
......
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