zouxuan 2 years ago
parent
commit
ff9514342b

+ 4 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupServiceImpl.java

@@ -5185,7 +5185,10 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
         if (!vipGroup.getStatus().equals(VipGroupStatusEnum.CANCEL)) {
             throw new BizException("课程组不是取消状态");
         }
-
+        List<CourseSchedule> schedules = courseScheduleDao.findGroupCourseSchedules(id.toString(), vipGroup.getGroupType());
+        if(!CollectionUtils.isEmpty(schedules)){
+            throw new BizException("当前课程组已排课");
+        }
         vipGroupDao.del(id);
         return true;
     }

+ 0 - 1
mec-web/src/main/java/com/ym/mec/web/controller/VipGroupManageController.java

@@ -449,7 +449,6 @@ public class VipGroupManageController extends BaseController {
     @ApiOperation(value = "删除直播课")
     @GetMapping(value = "/delLiveGroup/{id}")
     public HttpResponseResult<Object> delLiveGroup(@PathVariable Integer id){
-
         return succeed(vipGroupService.del(id));
     }
 }