|
|
|
@ -16,7 +16,7 @@ import com.ruoyi.system.api.model.LoginUser;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 登录校验方法
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
* @author ruoyi
|
|
|
|
|
*/
|
|
|
|
|
@Component
|
|
|
|
@ -56,16 +56,17 @@ 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, "登录用户不存在");
|
|
|
|
|
throw new BaseException("登录用户:" + username + " 不存在");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (R.FAIL == userResult.getCode())
|
|
|
|
|
{
|
|
|
|
|
throw new BaseException(userResult.getMsg());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
LoginUser userInfo = userResult.getData();
|
|
|
|
|
SysUser user = userResult.getData().getSysUser();
|
|
|
|
|
if (UserStatus.DELETED.getCode().equals(user.getDelFlag()))
|
|
|
|
@ -92,4 +93,4 @@ public class SysLoginService
|
|
|
|
|
{
|
|
|
|
|
remoteLogService.saveLogininfor(loginName, Constants.LOGOUT, "退出成功");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|