全局异常处理

This commit is contained in:
RuoYi
2020-09-17 12:08:30 +08:00
parent 15a4a5350d
commit 4ec6d51aca
3 changed files with 8 additions and 2 deletions

View File

@@ -55,6 +55,12 @@ public class SysLoginService
}
// 查询用户信息
R<LoginUser> userResult = remoteUserService.getUserInfo(username);
if (R.FAIL == userResult.getCode())
{
throw new BaseException(userResult.getMsg());
}
if (StringUtils.isNull(userResult) || StringUtils.isNull(userResult.getData()))
{
remoteLogService.saveLogininfor(username, Constants.LOGIN_FAIL, "登录用户不存在");