|
@@ -306,8 +306,11 @@ public class LoginController implements LoginControllerAPI {
|
|
|
|
|
|
|
|
WelcomeStudent student = welcomeStudentService.getDataByIdcardOrNum(mlr.getAdmissNum(), mlr.getCardId());
|
|
WelcomeStudent student = welcomeStudentService.getDataByIdcardOrNum(mlr.getAdmissNum(), mlr.getCardId());
|
|
|
if(student == null){
|
|
if(student == null){
|
|
|
- student = new WelcomeStudent();
|
|
|
|
|
|
|
+ return CommonResult.fail("录取号或身份证错误,登录失败!");
|
|
|
}
|
|
}
|
|
|
|
|
+ long expired = 1000 * 60 * 60 * 24 * 365;
|
|
|
|
|
+ TokenDateVo token = JWTUtil.getToken(student.getCardId(),student.getId(), expired);
|
|
|
|
|
+ student.setToken(token.getToken());
|
|
|
return CommonResult.ok(student);
|
|
return CommonResult.ok(student);
|
|
|
}
|
|
}
|
|
|
|
|
|