hejianhao
2026-08-28 16a57a8fc6868cea9171a1119698572407a2fc03
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package com.tcm.training.admin.app.user.controller;
 
import com.tcm.training.admin.app.user.service.AppUserCenterService;
import com.tcm.training.admin.app.user.vo.AppUserCenterVO;
import com.tcm.training.admin.common.ApiResponse;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
/**
 * APP 个人中心接口。
 */
@Validated
@RestController
@RequestMapping({"/api/app", "/api/v1/app"})
public class AppUserCenterController {
 
    private final AppUserCenterService appUserCenterService;
 
    /**
     * 注入 APP 个人中心服务。
     */
    public AppUserCenterController(AppUserCenterService appUserCenterService) {
        this.appUserCenterService = appUserCenterService;
    }
 
    /**
     * 获取当前登录用户的个人中心聚合信息。
     */
    @GetMapping("/user-center")
    public ApiResponse<AppUserCenterVO> getCurrentUserCenter() {
        return ApiResponse.ok(appUserCenterService.getCurrentUserCenter());
    }
}