From ee744bfd7b73e99dafee08b9dae7fa6eccf9837d Mon Sep 17 00:00:00 2001 From: wangqing <408564126@qq.com> Date: Tue, 26 Mar 2024 13:33:38 +0800 Subject: [PATCH] fix logOff --- .../com/luoo/user/controller/MyController.java | 17 +++-------------- .../com/luoo/user/dto/response/UserRespDTO.java | 3 +++ 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/luoo_user/src/main/java/com/luoo/user/controller/MyController.java b/luoo_user/src/main/java/com/luoo/user/controller/MyController.java index b0528d4..fb2b6b5 100644 --- a/luoo_user/src/main/java/com/luoo/user/controller/MyController.java +++ b/luoo_user/src/main/java/com/luoo/user/controller/MyController.java @@ -116,6 +116,7 @@ public class MyController extends BaseController { UserLoginDto userLoginDto = getUserLoginDto(authorization); UserInfo user = userInfoService.findById(userLoginDto.getUserId()); UserRespDTO userRespDTO = getUserRespDTO(user, true, Collections.emptySet()); + userRespDTO.setMobile(user.getMobile()); return Result.success(userRespDTO); } @@ -445,22 +446,10 @@ public class MyController extends BaseController { return thanks; } - // 查询我收到的评论 - @ApiOperation(value = "12.账户与安全", notes = "账户与安全") - @GetMapping("/accountSafety") - public Result getAccountSafety(@RequestHeader(value = "Authorization", required = true) String authorization) { - //验证是否登录,并且拿到ID - UserLoginDto userLoginDto = getUserLoginDto(authorization); - if (null == userLoginDto) { - return Result.unauthorized(null); - } - String userId = userLoginDto.getUserId(); - UserInfo userInfo = userInfoService.findById(userId); - return Result.success(userInfo); - } - @ApiOperation(value = "12.1 注销账号", notes = "注销账号") + + @ApiOperation(value = "12 注销账号", notes = "注销账号") @PostMapping ("/logOff") public Result logOff(@RequestHeader(value = "Authorization", required = true) String authorization, @VerifyParam LogoffReq logoffReq) { //验证是否登录,并且拿到ID diff --git a/luoo_user/src/main/java/com/luoo/user/dto/response/UserRespDTO.java b/luoo_user/src/main/java/com/luoo/user/dto/response/UserRespDTO.java index 49d0200..7631b0a 100644 --- a/luoo_user/src/main/java/com/luoo/user/dto/response/UserRespDTO.java +++ b/luoo_user/src/main/java/com/luoo/user/dto/response/UserRespDTO.java @@ -43,4 +43,7 @@ public class UserRespDTO implements Serializable { private String ipLocation; @ApiModelProperty(value = "是否有新的未读消息,true为有,false为无") private boolean haveNewMessage; + + @ApiModelProperty(value = "手机号") + private String mobile; }