Sfoglia il codice sorgente

管理端活动排课

zouxuan 3 anni fa
parent
commit
d0a2151c5b

+ 3 - 9
mec-web/src/main/java/com/ym/mec/web/controller/education/ActivityController.java

@@ -92,15 +92,12 @@ public class ActivityController extends BaseController {
             return failed("用户信息获取失败");
         }
         VipGroupApplyBaseInfoDto applyBaseInfo = vipGroupApplyDto.getVipGroupApplyBaseInfo();
-        Integer userId = sysUser.getId();
-        applyBaseInfo.setUserId(userId);
-        Teacher teacher = teacherDao.get(userId);
-        if(Objects.isNull(teacher)){
+        if(applyBaseInfo.getUserId() == null){
             return failed("请指定指导老师!");
         }
         Integer firstStudentId = applyBaseInfo.getFirstStudentId();
         SysUser student = teacherDao.getUser(firstStudentId);
-        if(Objects.isNull(student)||Objects.isNull(student.getOrganId())){
+        if(Objects.isNull(student) || Objects.isNull(student.getOrganId())){
             return failed("学员信息异常");
         }
         applyBaseInfo.setOrganId(student.getOrganId());
@@ -125,10 +122,7 @@ public class ActivityController extends BaseController {
             return failed("用户信息获取失败");
         }
         PracticeGroupApplyBaseInfoDto applyBaseInfo = practiceGroupApplyDto.getPracticeGroupApplyBaseInfoDto();
-        Integer userId = sysUser.getId();
-        applyBaseInfo.setUserId(userId);
-        Teacher teacher = teacherDao.get(userId);
-        if(Objects.isNull(teacher)){
+        if(applyBaseInfo.getUserId() == null){
             return failed("请指定指导老师!");
         }
         SysUser student = teacherDao.getUser(applyBaseInfo.getStudentId());