返回结果校验位置不对

This commit is contained in:
栗子 2022-04-07 11:05:12 +08:00
parent 0b6166663c
commit 604e6a4750
1 changed files with 2 additions and 2 deletions

View File

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