Kaynağa Gözat

1、添加教务老师字段
2、布置作业

Joburgess 5 yıl önce
ebeveyn
işleme
fd7a19d694

+ 0 - 5
mec-biz/src/main/java/com/ym/mec/biz/service/impl/PracticeGroupServiceImpl.java

@@ -133,8 +133,6 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
     //沈阳分部编号
     private static final Integer SHENYANG_ORGAN_ID = 6;
 
-    private static final Set<Integer> ENABLE_APPLY_ORGANIDS = new HashSet<>(Arrays.asList(new Integer[]{1, 43, 47}));
-
     private static Date activityStartDate, activityEndDate, applyStartDay, courseExpireDate;
 
     private static final Logger LOGGER = LoggerFactory
@@ -1626,9 +1624,6 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
         if (Objects.isNull(practiceGroup.getUserId())) {
             throw new BizException("请选择老师");
         }
-        if(!ENABLE_APPLY_ORGANIDS.contains(practiceGroup.getOrganId())){
-            throw new BizException("所在城市暂不参与此活动");
-        }
         Map result = new HashMap();
         SysConfig practiceSubjectIdListConfig = sysConfigService.findByParamName(SysConfigService.PRACTICE_SUBJECT_ID_LIST);
         if (Objects.isNull(practiceGroup.getSubjectId())

+ 5 - 0
mec-student/src/main/java/com/ym/mec/student/controller/PracticeGroupController.java

@@ -53,6 +53,8 @@ public class PracticeGroupController extends BaseController {
     @Autowired
     private CourseScheduleEvaluateDao courseScheduleEvaluateDao;
 
+    private static final Set<Integer> ENABLE_APPLY_ORGANIDS = new HashSet<>(Arrays.asList(new Integer[]{1, 43, 47}));
+
     @ApiOperation("获取学生的陪练课")
     @GetMapping(value = "/findUserPracticeCourses")
     public Object findUserPracticeCourses(){
@@ -135,6 +137,9 @@ public class PracticeGroupController extends BaseController {
         if(excludeOrganIds.contains(sysUser.getOrganId())){
             throw new BizException("请联系老师确认您的所属分部");
         }
+        if(!ENABLE_APPLY_ORGANIDS.contains(sysUser.getOrganId())){
+            throw new BizException("所在城市暂不参与此活动");
+        }
         practiceGroup.setStudentId(sysUser.getId());
         return succeed(practiceGroupService.practiceApply(practiceGroup));
     }