|
@@ -1058,6 +1058,16 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
throw new BizException("您无法购买此课程");
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ ClassGroup classGroup = classGroupDao.findByVipGroup(vipGroupId.longValue(), null);
|
|
|
+
|
|
|
+ if(classGroup.getStudentNum()>0&&(VipGroupStatusEnum.APPLYING.equals(vipGroup.getStatus()))){
|
|
|
+ int i = studentPaymentOrderDao.countGroupOrderWithoutFailed(vipGroupId.toString(), GroupType.VIP);
|
|
|
+ if(i>0){
|
|
|
+ throw new BizException("该课程组学员为购买加入,无法添加学员加入,请走学员走购买流程!");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
List<CourseSchedule> courseSchedules = JSON.parseArray(vipGroup.getCourseSchedulesJson(),CourseSchedule.class);
|
|
|
courseScheduleService.checkNewCourseSchedules(courseSchedules,false);
|
|
|
}
|