Browse Source

Merge branch 'saas' of http://git.dayaedu.com/yonge/mec into saas

yonge 3 năm trước cách đây
mục cha
commit
43284c057f

+ 3 - 6
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentRegistrationServiceImpl.java

@@ -1237,12 +1237,9 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
             studentRegistrationDao.update(studentRegistration);
             //减去缴费人数(器乐收费,0元时不减缴费人数)
             studentPaymentOrderService.cutSubjectPlan(studentPaymentOrder);
-            //余额
-            if (studentPaymentOrder.getBalancePaymentAmount() != null && studentPaymentOrder.getBalancePaymentAmount().compareTo(BigDecimal.ZERO) > 0) {
-                sysUserCashAccountService.updateBalance(studentPaymentOrder.getUserId(), studentPaymentOrder.getBalancePaymentAmount(), PlatformCashAccountDetailTypeEnum.REFUNDS, "报名缴费失败");
-            }
-            //优惠券
-            sysCouponCodeService.quit(studentPaymentOrder.getCouponCodeId());
+
+            //退还优惠券和余额
+            studentPaymentOrderService.returnBalanceAndCoupon(studentPaymentOrder,"报名缴费失败");
             //三方乐团不发送缴费通知
             if (musicGroup.getOwnershipType() != null && musicGroup.getOwnershipType() == CooperationOrgan.OwnershipType.OWN) {
                 String studentApplyUrl = sysConfigDao.findConfigValue(SysConfigService.STUDENT_APPLY_URL) + studentRegistration.getMusicGroupId();