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