|
@@ -538,7 +538,6 @@ public class EduPracticeGroupServiceImpl implements EduPracticeGroupService{
|
|
|
student.setComeOnPackage(2);
|
|
|
courseTimes = 8;
|
|
|
}
|
|
|
- studentDao.update(student);
|
|
|
|
|
|
if(courseTimes<=0){
|
|
|
return BaseController.failed(HttpStatus.EXPECTATION_FAILED, "课程信息错误");
|
|
@@ -568,7 +567,7 @@ public class EduPracticeGroupServiceImpl implements EduPracticeGroupService{
|
|
|
|
|
|
List<CourseSchedule> practiceCourses = new ArrayList<>();
|
|
|
|
|
|
- while (practiceCourses.size()<=courseTimes){
|
|
|
+ while (practiceCourses.size()<courseTimes){
|
|
|
courseStartDay=courseStartDay.plusDays(1);
|
|
|
int dayOfWeek = courseStartDay.get(DateUtil.weekFields.dayOfWeek());
|
|
|
for (PracticeDrillTimeDto drillTime : practiceGroupBuyParams.getDrillTimes()) {
|
|
@@ -624,12 +623,12 @@ public class EduPracticeGroupServiceImpl implements EduPracticeGroupService{
|
|
|
|
|
|
PracticeGroupSellPrice practiceGroupSellPrice = practiceGroupSellPriceDao.get(sysUser.getOrganId());
|
|
|
if(Objects.isNull(practiceGroupSellPrice)){
|
|
|
- return BaseController.failed(HttpStatus.EXPECTATION_FAILED, "所在城市暂不参与此活动");
|
|
|
+ throw new BizException("所在城市暂不参与此活动");
|
|
|
}
|
|
|
|
|
|
BigDecimal price = PracticeGroupType.CARE_PACKAGE.equals(practiceGroupBuyParams.getType())?practiceGroupSellPrice.getCarePackagePrice():practiceGroupSellPrice.getComeOnPackagePrice();
|
|
|
if(Objects.isNull(price)&&PracticeGroupType.COME_ON_PACKAGE.equals(practiceGroupBuyParams.getType())){
|
|
|
- return BaseController.failed(HttpStatus.EXPECTATION_FAILED, "请设置加油包价格");
|
|
|
+ throw new BizException("请设置加油包价格");
|
|
|
}
|
|
|
|
|
|
practiceGroupBuyParams.setCoursesStartDate(practiceCourses.stream().min(Comparator.comparing(CourseSchedule::getStartClassTime)).get().getStartClassTime());
|
|
@@ -759,6 +758,7 @@ public class EduPracticeGroupServiceImpl implements EduPracticeGroupService{
|
|
|
courseScheduleTeacherSalaryDao.batchInsert(courseScheduleTeacherSalaries);
|
|
|
courseScheduleStudentPaymentDao.batchInsert(courseScheduleStudentPayments);
|
|
|
teacherAttendanceDao.batchInsert(teacherAttendances);
|
|
|
+ studentDao.update(student);
|
|
|
|
|
|
try {
|
|
|
courseScheduleService.checkNewCourseSchedules(practiceCourses,false,false);
|