Joburgess 4 tahun lalu
induk
melakukan
872022314d

+ 5 - 3
mec-web/src/main/java/com/ym/mec/web/controller/CourseScheduleController.java

@@ -165,9 +165,11 @@ public class CourseScheduleController extends BaseController {
         if(Objects.isNull(oldCourseSchedule)){
             return failed("未找到指定课程");
         }
-        VipGroup vipGroup = vipGroupDao.findByCourseSchedule(courseSchedule.getId());
-        if(!VipGroupStatusEnum.PROGRESS.equals(vipGroup.getStatus())){
-            throw new BizException("当前课程组状态非进行中,无法进行该操作");
+        if(GroupType.VIP.equals(oldCourseSchedule.getGroupType())){
+            VipGroup vipGroup = vipGroupDao.findByCourseSchedule(courseSchedule.getId());
+            if(!VipGroupStatusEnum.PROGRESS.equals(vipGroup.getStatus())){
+                throw new BizException("当前课程组状态非进行中,无法进行该操作");
+            }
         }
         if(Objects.isNull(courseSchedule.getClassGroupId())){
             courseSchedule.setClassGroupId(oldCourseSchedule.getClassGroupId());