|
|
@@ -51,8 +51,10 @@ public class AuthController {
|
|
|
if (result.isSuccess()){
|
|
|
AccountDTO accountDTO = result.getData();
|
|
|
Long school_id = -1L;
|
|
|
+ Long teacherId = -1L;
|
|
|
try {
|
|
|
school_id = accountDTO.getRoleMaps().stream().filter(roleDTO -> "教师".equals(roleDTO.getRole_name())).findFirst().get().getSchool_id();
|
|
|
+ teacherId = accountApi.getTeacherId(school_id, accountDTO.getId()).getData();
|
|
|
if (school_id == -1){
|
|
|
throw new BizException(ExceptionCode.USER_NOT_EXIST);
|
|
|
}
|
|
|
@@ -60,6 +62,7 @@ public class AuthController {
|
|
|
throw new BizException(ExceptionCode.USER_NOT_EXIST);
|
|
|
}
|
|
|
accountDTO.setSchool_id(school_id);
|
|
|
+ accountDTO.setTeacher_id(teacherId);
|
|
|
String realName = accountApi.getUsername(school_id, accountDTO.getId()).getData();
|
|
|
accountDTO.setUsername(realName);
|
|
|
JwtInfo jwtInfo = new JwtInfo("school", school_id, accountDTO.getId(), StringUtils.isEmpty(realName) ? accountDTO.getUser_phone() : realName, accountDTO.getUser_phone());
|