|
|
@@ -0,0 +1,71 @@
|
|
|
+package com.kym.miniapp.controller;
|
|
|
+
|
|
|
+import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
|
+import com.kym.common.R;
|
|
|
+import com.kym.common.annotation.SysLog;
|
|
|
+import com.kym.common.controller.IController;
|
|
|
+import com.kym.entity.admin.Feedback;
|
|
|
+import com.kym.entity.admin.queryParams.FeedbackQueryParam;
|
|
|
+import com.kym.service.admin.FeedbackService;
|
|
|
+import jakarta.annotation.Resource;
|
|
|
+import jakarta.validation.Valid;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.PathVariable;
|
|
|
+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;
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * 纠错反馈接口
|
|
|
+ *
|
|
|
+ * @date 2024-09-22T20:40:35.300431885
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@RequestMapping("feedback")
|
|
|
+public class FeedbackController extends IController {
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private FeedbackService feedbackService;
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 纠错反馈新增接口
|
|
|
+ *
|
|
|
+ * @param feedback 新增纠错反馈
|
|
|
+ * @return Res
|
|
|
+ */
|
|
|
+ @PostMapping("add")
|
|
|
+ @SysLog(value = "纠错反馈新增接口")
|
|
|
+ public R<?> add(@Valid @RequestBody Feedback feedback) {
|
|
|
+//other params checked
|
|
|
+ return resp(() -> feedbackService.add(feedback));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 纠错反馈查询接口
|
|
|
+ *
|
|
|
+ * @return Res
|
|
|
+ */
|
|
|
+ @PostMapping("list")
|
|
|
+ @SysLog(value = "纠错反馈列表查询接口")
|
|
|
+ public R<?> list(@RequestBody FeedbackQueryParam query) {
|
|
|
+ return resp(() -> feedbackService.list(query));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 纠错反馈查询详情接口
|
|
|
+ *
|
|
|
+ * @return Res
|
|
|
+ */
|
|
|
+ @GetMapping("detail/{id}")
|
|
|
+ @SysLog(value = "纠错反馈详情查询接口")
|
|
|
+ public R<?> detail(@PathVariable long id) {
|
|
|
+ return resp(() -> feedbackService.detail(id));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+}
|