增加个人信息的加载

This commit is contained in:
YunaiV
2021-11-26 09:47:23 +08:00
parent 86ef156de4
commit 2da6a746e4
13 changed files with 295 additions and 99 deletions

View File

@ -1,11 +1,11 @@
### 请求 /system/user/profile/get 接口 => 没有权限
GET {{userServerUrl}}/system/user/profile/get
### 请求 /member/user/profile/get 接口 => 没有权限
GET {{userServerUrl}}/member/user/profile/get
Authorization: Bearer test245
### 请求 /system/user/profile/revise-nickname 接口 成功
PUT {{userServerUrl}}/system/user/profile/update-nickname?nickName=yunai222
### 请求 /member/user/profile/revise-nickname 接口 成功
PUT {{userServerUrl}}/member/user/profile/update-nickname?nickName=yunai222
Authorization: Bearer test245
### 请求 /system/user/profile/get-user-info 接口 成功
GET {{userServerUrl}}/system/user/profile/get-user-info?id=245
Authorization: Bearer test245
### 请求 /member/user/profile/get-user-info 接口 成功
GET {{userServerUrl}}/member/user/profile/get-user-info?id=245
Authorization: Bearer test245

View File

@ -27,7 +27,7 @@ import static cn.iocoder.yudao.userserver.modules.member.enums.MbrErrorCodeConst
@Api(tags = "用户个人中心")
@RestController
@RequestMapping("/system/user/profile")
@RequestMapping("/member/user/profile")
@Validated
@Slf4j
public class SysUserProfileController {
@ -57,14 +57,13 @@ public class SysUserProfileController {
return success(avatar);
}
@GetMapping("/get-user-info")
@ApiOperation("取用户头像与昵称")
@GetMapping("/get")
@ApiOperation("得基本信息")
@PreAuthenticated
public CommonResult<MbrUserInfoRespVO> getUserInfo() {
return success(userService.getUserInfo(getLoginUserId()));
}
@PostMapping("/update-mobile")
@ApiOperation(value = "修改用户手机")
@PreAuthenticated

View File

@ -65,6 +65,7 @@ public interface MbrUserService {
/**
* 根据用户id获取用户头像与昵称
*
* @param userId 用户id
* @return 用户响应实体类
*/

View File

@ -40,7 +40,6 @@ public class SysAuthController {
@Resource
private SysSocialService socialService;
@PostMapping("/login")
@ApiOperation("使用手机 + 密码登录")
public CommonResult<SysAuthLoginRespVO> login(@RequestBody @Valid SysAuthLoginReqVO reqVO) {