Просмотр исходного кода

1、陪练课调整
2、付费陪练课可预约时间调整

Joburgess 5 лет назад
Родитель
Сommit
47290941b9

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

@@ -128,13 +128,13 @@ public class GroupClassServiceImpl implements GroupClassService {
             if(CollectionUtils.isEmpty(orders)&&Objects.nonNull(refundAmount)){
                 throw new BizException("未获取到订单");
             }
-            if(refundAmount.compareTo(orders.get(0).getExpectAmount())>0){
-                throw new BizException("退款不可大于购买金额");
-            }
             if(!practiceGroup.getGroupStatus().equals(GroupStatusEnum.NORMAL)||practiceGroup.getCoursesExpireDate().before(now)){
                 throw new BizException("当前课程组不可关闭");
             }
             if(Objects.nonNull(refundAmount)&&refundAmount.compareTo(BigDecimal.ZERO)>0){
+                if(refundAmount.compareTo(orders.get(0).getExpectAmount())>0){
+                    throw new BizException("退款不可大于购买金额");
+                }
                 sysUserCashAccountService.updateBalance(practiceGroup.getStudentId(), refundAmount, PlatformCashAccountDetailTypeEnum.REFUNDS, "后团关闭网管课");
             }
             cleanGroupInfo(groupId.toString(), GroupType.PRACTICE);