Forráskód Böngészése

fix:加油包教师未设置课酬取消默认16.67,直接提示未设置课酬

Joburgess 4 éve
szülő
commit
3cd7146cb6

+ 4 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/EduPracticeGroupServiceImpl.java

@@ -710,7 +710,10 @@ public class EduPracticeGroupServiceImpl implements EduPracticeGroupService{
         courseScheduleDao.batchAddCourseSchedules(practiceCourses);
         TeacherDefaultPracticeGroupSalary teacherDefaultPracticeGroupSalary = teacherDefaultPracticeGroupSalaryDao.findByTeacherAndCourseMinutes(practiceGroupBuyParams.getUserId(),practiceCourseMinutes);
         BigDecimal teacherDefaultSalary=null;
-        if(Objects.nonNull(teacherDefaultPracticeGroupSalary)&&PracticeGroupType.COME_ON_PACKAGE.equals(practiceGroupBuyParams.getType())){
+        if(PracticeGroupType.COME_ON_PACKAGE.equals(practiceGroupBuyParams.getType())){
+            if(Objects.isNull(teacherDefaultPracticeGroupSalary)){
+                throw new BizException("请设置老师课酬");
+            }
             teacherDefaultSalary=teacherDefaultPracticeGroupSalary.getMainTeacherSalary();
         }else{
             teacherDefaultSalary = new BigDecimal(practiceCourseSalaryConfig.getParanValue());