调整个人中心接口登录问题
This commit is contained in:
parent
638d5865dc
commit
787e8edc45
|
|
@ -28,14 +28,10 @@ public class UserController {
|
||||||
@Resource
|
@Resource
|
||||||
IUserService iUserService;
|
IUserService iUserService;
|
||||||
|
|
||||||
@NotLogin
|
|
||||||
@GetMapping("/center")
|
@GetMapping("/center")
|
||||||
@ApiOperation(value="个人中心")
|
@ApiOperation(value="个人中心")
|
||||||
public AjaxResult<UserCenterVo> center() {
|
public AjaxResult<UserCenterVo> center() {
|
||||||
Integer userId = LikeFrontThreadLocal.getUserId();
|
Integer userId = LikeFrontThreadLocal.getUserId();
|
||||||
if (userId == 0) {
|
|
||||||
throw new OperateException("未登录", 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
UserCenterVo vo = iUserService.center(userId);
|
UserCenterVo vo = iUserService.center(userId);
|
||||||
return AjaxResult.success(vo);
|
return AjaxResult.success(vo);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue