Przeglądaj źródła

Merge branch 'active_course_2021-09-26~29' of http://git.dayaedu.com/yonge/mec into 2021-double-eleven

zouxuan 3 lat temu
rodzic
commit
9fc5066b5d

+ 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());