main
wangqing 8 months ago
parent 6fa8d53954
commit ee744bfd7b

@ -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<UserInfo> 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<Void> logOff(@RequestHeader(value = "Authorization", required = true) String authorization, @VerifyParam LogoffReq logoffReq) {
//验证是否登录并且拿到ID

@ -43,4 +43,7 @@ public class UserRespDTO implements Serializable {
private String ipLocation;
@ApiModelProperty(value = "是否有新的未读消息true为有false为无")
private boolean haveNewMessage;
@ApiModelProperty(value = "手机号")
private String mobile;
}

Loading…
Cancel
Save