Commit 1ecc72e4 authored by liqin's avatar liqin 💬

bug fixed

parent df6b5e42
......@@ -114,19 +114,18 @@ public class LoginController {
@ApiOperation(value = "获取用户登录token信息", notes = "获取用户登录token信息", httpMethod = "POST", produces = "application/json; charset=UTF-8")
@PostMapping("/info")
public Map info(HttpServletRequest request) throws Exception {
public Result info(HttpServletRequest request) throws Exception {
String token = request.getHeader("token");
String tokenKey = StringUtil.formatKeyWithPrefix(Constants.RedisKey.PROJECT_PRIFIX, Constants.RedisKey.TOKEN_PRIFIX, token);
String userDtoJson = redisUtils.getValue(tokenKey);
if (StringUtil.isBlank(userDtoJson)) {
Map map = new HashMap();
map.put("code", "2001");
map.put("msg", "未登录");
return map;
// Map map = new HashMap();
// map.put("code", "2001");
// map.put("msg", "未登录");
return ResultUtils.returnFail("未登录");
}
UsersDto usersDto = JSONObject.parseObject(userDtoJson, UsersDto.class);
return (Map) ResultUtils.returnDataSuccess(userDtoJson);
return ResultUtils.returnDataSuccess(usersDto);
}
@ApiOperation(value = "二维码邀请注册", notes = "二维码邀请注册", httpMethod = "GET")
......
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