|
@@ -2468,12 +2468,12 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
throw new BizException("未找到指定的vip课程");
|
|
|
}
|
|
|
|
|
|
- if(!VipGroupStatusEnum.PROGRESS.equals(vipGroup.getStatus())){
|
|
|
+ ClassGroup classGroup = classGroupDao.findByVipGroup(vipGroupId, null);
|
|
|
+
|
|
|
+ if(!VipGroupStatusEnum.PROGRESS.equals(vipGroup.getStatus())&&classGroup.getExpectStudentNum()>1){
|
|
|
throw new BizException("VIP课程组尚未成立,无法添加学员,请走学员购买流程!");
|
|
|
}
|
|
|
|
|
|
- ClassGroup classGroup = classGroupDao.findByVipGroup(vipGroupId, null);
|
|
|
-
|
|
|
Integer studentNum = classGroupStudentMapperDao.countClassGroupStudentNum(classGroup.getId());
|
|
|
if(studentNum.compareTo(classGroup.getExpectStudentNum())>=0){
|
|
|
throw new BizException("该班级人数已达上限");
|