Joburgess 5 years ago
parent
commit
4ba4610d4b

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

@@ -471,8 +471,8 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 		if(Objects.isNull(vipGroup)){
 			throw new BizException("课程组不存在");
 		}
-		int totalCourseNum = courseScheduleDao.countTotalCourseScheduleNumWithGroup(vipGroupId.toString(), GroupType.VIP.getCode());
-		if(totalCourseNum>0){
+		Integer courseEndNum = courseScheduleDao.findCourseEndNum(vipGroupId);
+		if(courseEndNum>0){
 			throw new BizException("此状态课程组不支持删除");
 		}
 		vipGroup.setStatus(VipGroupStatusEnum.DELETE);