Joburgess 5 rokov pred
rodič
commit
a31e875e47

+ 6 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java

@@ -1930,6 +1930,9 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
                 if (Objects.isNull(vipGroup)) {
                     throw new BizException("指定课程不存在");
                 }
+				if(!VipGroupStatusEnum.PROGRESS.equals(vipGroup.getStatus())){
+					throw new BizException("非进行中课程组不允许进行此操作");
+				}
                 singleClassMinutes = vipGroup.getSingleClassMinutes();
                 courseNum = courseScheduleDao.countVipGroupCourses(vipGroup.getId().intValue(),groupType.getCode());
         }
@@ -2699,6 +2702,9 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 						if (vipGroup == null) {
 							throw new BizException("课程[{}]记录存在异常,请联系管理员", courseScheduleId);
 						}
+						if(!VipGroupStatusEnum.PROGRESS.equals(vipGroup.getStatus())){
+							throw new BizException("非进行中课程组不允许进行此操作");
+						}
 
 						BigDecimal teacherSalary=BigDecimal.ZERO;
 

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

@@ -2304,6 +2304,9 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 		if(Objects.isNull(oldVipGroupInfo)){
 			throw new BizException("指定的vip课不存在");
 		}
+		if(!VipGroupStatusEnum.PROGRESS.equals(oldVipGroupInfo.getStatus())){
+			throw new BizException("非进行中课程组不允许进行此操作");
+		}
 		if(Objects.isNull(vipGroupApplyBaseInfo.getId())){
 			return;
 		}