Commit b788df7d by 墨竹

feat:登录兼容

parent ab7e5560
...@@ -41,12 +41,11 @@ public class AuthRequestUtil { ...@@ -41,12 +41,11 @@ public class AuthRequestUtil {
getSession().removeAttribute(LOGIN_SESSION_KEY); getSession().removeAttribute(LOGIN_SESSION_KEY);
} }
public static Object getAppLoginUser(String token) { public static LoginDTO getAppLoginUser(String token) {
logger.info("token-web=" + token); logger.info("token-web=" + token);
if (StringUtils.isBlank(token)) { if (StringUtils.isBlank(token)) {
return null; return null;
} }
//为了做兼容
return EntityUtil.changeEntityByJSON(LoginDTO.class, RedisUtil.getCache(token)); return EntityUtil.changeEntityByJSON(LoginDTO.class, RedisUtil.getCache(token));
} }
...@@ -148,7 +147,6 @@ public class AuthRequestUtil { ...@@ -148,7 +147,6 @@ public class AuthRequestUtil {
} }
} }
} }
Object appLoginUser = getAppLoginUser(token); return getAppLoginUser(token);
return EntityUtil.changeEntityByJSON(LoginDTO.class, appLoginUser);
} }
} }
...@@ -144,8 +144,7 @@ public class LoginController extends WebBaseController { ...@@ -144,8 +144,7 @@ public class LoginController extends WebBaseController {
@RequestMapping("get-login-info") @RequestMapping("get-login-info")
@Deprecated @Deprecated
public HaobanResponse getLoginInfo() { public HaobanResponse getLoginInfo() {
LoginDTO loginVO = AuthRequestUtil.getLoginUser(); return resultResponse(HaoBanErrCode.ERR_1, AuthRequestUtil.getLoginUser());
return resultResponse(HaoBanErrCode.ERR_1, loginVO);
} }
@RequestMapping("get-login-qrcode") @RequestMapping("get-login-qrcode")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment