|
@@ -1965,7 +1965,11 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
courseScheduleStudentPayment.setClassGroupId(vipGroupCourseSchedule.getClassGroupId());
|
|
|
courseScheduleStudentPayment.setCourseScheduleId(vipGroupCourseSchedule.getId());
|
|
|
courseScheduleStudentPayment.setUserId(studentId);
|
|
|
- courseScheduleStudentPayment.setExpectPrice(avgCourseFee);
|
|
|
+ if(vipGroupCourseSchedule.getTeachMode().equals(TeachModeEnum.OFFLINE)){
|
|
|
+ surplusCoursesPrice=surplusCoursesPrice.add(vipGroup.getOfflineClassesUnitPrice());
|
|
|
+ }else if(vipGroupCourseSchedule.getTeachMode().equals(TeachModeEnum.ONLINE)){
|
|
|
+ surplusCoursesPrice=surplusCoursesPrice.add(vipGroup.getOnlineClassesUnitPrice());
|
|
|
+ }
|
|
|
if(hasGiveClass
|
|
|
&&vipGroup.getGiveTeachMode() == vipGroupCourseSchedule.getTeachMode()){
|
|
|
if(vipGroupCourseSchedule.getTeachMode().equals(TeachModeEnum.OFFLINE)
|
|
@@ -2010,8 +2014,12 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
classGroupStudentMapperDao.classGroupStudentsInsert(classGroupStudentMappers);
|
|
|
}
|
|
|
|
|
|
- vipGroup.setStatus(VipGroupStatusEnum.PROGRESS);
|
|
|
- vipGroupDao.update(vipGroup);
|
|
|
+ Integer currentStudentNum = classGroupStudentMapperDao.countClassGroupStudentNum(classGroup.getId());
|
|
|
+ if(vipGroup.getStatus().equals(VipGroupStatusEnum.APPLYING)
|
|
|
+ &¤tStudentNum.compareTo(classGroup.getExpectStudentNum())>=0){
|
|
|
+ vipGroup.setStatus(VipGroupStatusEnum.PROGRESS);
|
|
|
+ vipGroupDao.update(vipGroup);
|
|
|
+ }
|
|
|
classGroup.setDelFlag(0);
|
|
|
classGroupDao.update(classGroup);
|
|
|
classGroupService.updateClassGroupInfo(classGroup.getId());
|