瀏覽代碼

fix applyOrder bug

周箭河 5 年之前
父節點
當前提交
36295d1468
共有 1 個文件被更改,包括 5 次插入2 次删除
  1. 5 2
      mec-student/src/main/java/com/ym/mec/student/controller/MusicGroupController.java

+ 5 - 2
mec-student/src/main/java/com/ym/mec/student/controller/MusicGroupController.java

@@ -201,8 +201,10 @@ public class MusicGroupController extends BaseController {
 
         Integer userId = studentRegistration.getUserId();
 
+
         StudentPaymentOrder ApplyOrder = studentPaymentOrderService.findMusicGroupApplyOrderByStatus(userId, studentRegistration.getMusicGroupId(), DealStatusEnum.SUCCESS);
-        if (ApplyOrder != null) {
+        StudentPaymentOrder waitPay = studentPaymentOrderService.findMusicGroupApplyOrderByStatus(userId, studentRegistration.getMusicGroupId(), DealStatusEnum.WAIT_PAY);
+        if (ApplyOrder != null && waitPay == null) {
             return failed("您已支付成功,请勿重复支付");
         }
 
@@ -231,7 +233,8 @@ public class MusicGroupController extends BaseController {
         Integer userId = studentRegistration.getUserId();
 
         StudentPaymentOrder ApplyOrder = studentPaymentOrderService.findMusicGroupApplyOrderByStatus(userId, studentRegistration.getMusicGroupId().toString(), DealStatusEnum.SUCCESS);
-        if (ApplyOrder != null) {
+        StudentPaymentOrder waitPay = studentPaymentOrderService.findMusicGroupApplyOrderByStatus(userId, studentRegistration.getMusicGroupId(), DealStatusEnum.WAIT_PAY);
+        if (ApplyOrder != null && waitPay == null) {
             return failed("您已支付成功,请勿重复支付");
         }
         Map payMap = musicGroupService.rePay(registerPayDto);