用户中心
This commit is contained in:
parent
28bc67b88a
commit
00a062331b
|
@ -13,4 +13,4 @@ auth:
|
|||
- /maku/t_user/updateUser
|
||||
- /maku/t_user/register
|
||||
- /maku/t_user/logout
|
||||
- /maku/t_user/info/{username}
|
||||
- /maku/t_user/info
|
|
@ -68,8 +68,6 @@ public class TUserController {
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@PutMapping("/updateUser")
|
||||
@Operation(summary = "修改")
|
||||
public Result<TUserVO> updateUser(@RequestBody TUserVO vo){
|
||||
|
@ -77,14 +75,14 @@ public class TUserController {
|
|||
|
||||
return Result.ok(tUserVO);
|
||||
}
|
||||
//根据用户的用户名获取属性
|
||||
// @PostMapping("/info/{username}")
|
||||
// @Operation(summary = "用户中心")
|
||||
// public Result findByUsername(@PathVariable String username){
|
||||
// QueryWrapper<TUserEntity> wrapper = new QueryWrapper<>();
|
||||
// wrapper.eq(,username);
|
||||
// return Result.ok();
|
||||
// }
|
||||
|
||||
@GetMapping("/info")
|
||||
@Operation(summary = "用户中心")
|
||||
public Result findByUsername(HttpServletRequest request){
|
||||
String token = request.getHeader("token");
|
||||
TUserEntity entity = (TUserEntity) redisCache.get(token);
|
||||
return Result.ok(entity);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/logout")
|
||||
|
@ -96,7 +94,7 @@ public class TUserController {
|
|||
redisCache.delete(token);
|
||||
return Result.ok("退出登录");
|
||||
}
|
||||
return Result.error("登录失败");
|
||||
return Result.error("登出失败");
|
||||
}
|
||||
|
||||
@GetMapping("page")
|
||||
|
|
Loading…
Reference in New Issue
Block a user