This commit is contained in:
hucs
2024-07-04 13:26:49 +08:00
parent 08d50c8ad5
commit d2e3108d79

View File

@@ -60,6 +60,15 @@ public class PlayOrderInfoController {
if (orderInfo.getFinalAmount().compareTo(vo.getRefundAmount()) < 0) {
throw new CustomException("退款金额不能大于支付金额");
}
if (orderInfo.getOrderStatus().equals("3")) {
throw new CustomException("【已完成】的订单无法操作退款");
}
if (orderInfo.getOrderStatus().equals("4")) {
throw new CustomException("【已取消】的订单无法操作退款");
}
if (orderInfo.getRefundType().equals("1")) {
throw new CustomException("每个订单只能退款一次~");
}
PlayOrderInfoEntity updateOrderInfo = new PlayOrderInfoEntity();
updateOrderInfo.setId(orderInfo.getId());
updateOrderInfo.setRefundType("1");