xiangpei
2025-05-14 47cd9ecc0eff38ffe6b3b794b2bf197e958f4403
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
38
package com.mindskip.xzs.controller.student;
 
import com.mindskip.xzs.base.BaseApiController;
import com.mindskip.xzs.base.RestResponse;
import com.mindskip.xzs.domain.vo.FeedbackVO;
import com.mindskip.xzs.service.FeedbackService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
/**
 * @author gonghl
 * @since 2024/5/7 下午 3:57
 */
 
@RequiredArgsConstructor
@RestController("StudentFeedBackController")
@RequestMapping("/api/student/feedback")
public class FeedBackController extends BaseApiController {
 
    private final FeedbackService feedbackService;
 
    /**
     * 保存反馈
     *
     * @param feedbackVO 数据
     * @return 操作结果
     */
    @PostMapping("saveFeedback")
    public RestResponse<String> saveFeedback(@RequestBody FeedbackVO feedbackVO) {
        feedbackVO.setUserId(getCurrentUser().getId());
        feedbackService.saveFeedback(feedbackVO);
        return RestResponse.ok("操作成功");
    }
 
}