hejianhao
2026-08-20 2f5f94f57693c8e056ee89c505bb5d784ecddc1d
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
36
37
package com.tcm.training.admin.system.controller;
 
import com.tcm.training.admin.common.ApiResponse;
import com.tcm.training.admin.common.PageResponse;
import com.tcm.training.admin.system.service.UserFeedbackAppService;
import com.tcm.training.admin.system.vo.UserFeedbackListItemVO;
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.RequestParam;
import org.springframework.web.bind.annotation.RestController;
 
@Validated
@RestController
@RequestMapping({"/api/v1", "/api"})
public class UserFeedbackController {
 
    private final UserFeedbackAppService userFeedbackAppService;
 
    /**
     * 注入用户反馈后台查询服务。
     */
    public UserFeedbackController(UserFeedbackAppService userFeedbackAppService) {
        this.userFeedbackAppService = userFeedbackAppService;
    }
 
    /**
     * 分页查询用户反馈列表,供后台管理端使用。
     */
    @GetMapping("/user-feedbacks")
    public ApiResponse<PageResponse<UserFeedbackListItemVO>> page(
            @RequestParam(required = false, defaultValue = "1") int page,
            @RequestParam(required = false, defaultValue = "10") int pageSize,
            @RequestParam(required = false) String content) {
        return ApiResponse.ok(userFeedbackAppService.page(page, pageSize, content));
    }
}