用户中心

This commit is contained in:
xiaoqiantx223 2024-07-18 14:45:55 +08:00
parent 28bc67b88a
commit 00a062331b
2 changed files with 10 additions and 12 deletions

View File

@ -13,4 +13,4 @@ auth:
- /maku/t_user/updateUser - /maku/t_user/updateUser
- /maku/t_user/register - /maku/t_user/register
- /maku/t_user/logout - /maku/t_user/logout
- /maku/t_user/info/{username} - /maku/t_user/info

View File

@ -68,8 +68,6 @@ public class TUserController {
} }
@PutMapping("/updateUser") @PutMapping("/updateUser")
@Operation(summary = "修改") @Operation(summary = "修改")
public Result<TUserVO> updateUser(@RequestBody TUserVO vo){ public Result<TUserVO> updateUser(@RequestBody TUserVO vo){
@ -77,14 +75,14 @@ public class TUserController {
return Result.ok(tUserVO); return Result.ok(tUserVO);
} }
//根据用户的用户名获取属性
// @PostMapping("/info/{username}") @GetMapping("/info")
// @Operation(summary = "用户中心") @Operation(summary = "用户中心")
// public Result findByUsername(@PathVariable String username){ public Result findByUsername(HttpServletRequest request){
// QueryWrapper<TUserEntity> wrapper = new QueryWrapper<>(); String token = request.getHeader("token");
// wrapper.eq(,username); TUserEntity entity = (TUserEntity) redisCache.get(token);
// return Result.ok(); return Result.ok(entity);
// } }
@PostMapping("/logout") @PostMapping("/logout")
@ -96,7 +94,7 @@ public class TUserController {
redisCache.delete(token); redisCache.delete(token);
return Result.ok("退出登录"); return Result.ok("退出登录");
} }
return Result.error("失败"); return Result.error("失败");
} }
@GetMapping("page") @GetMapping("page")