From e0ea1f4a21321f145be79556896181f23f22b708 Mon Sep 17 00:00:00 2001
From: gongzuming <gongzuming>
Date: 星期四, 29 八月 2024 09:33:16 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master' into master-v2

---
 src/main/java/com/mzl/flower/web/content/FeedbackController.java |   70 +++++++++++++++++++++++++++++++++++
 1 files changed, 70 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/mzl/flower/web/content/FeedbackController.java b/src/main/java/com/mzl/flower/web/content/FeedbackController.java
new file mode 100644
index 0000000..fefa4ec
--- /dev/null
+++ b/src/main/java/com/mzl/flower/web/content/FeedbackController.java
@@ -0,0 +1,70 @@
+package com.mzl.flower.web.content;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.mzl.flower.base.BaseController;
+import com.mzl.flower.base.R;
+import com.mzl.flower.base.ReturnDataDTO;
+import com.mzl.flower.config.security.SecurityUtils;
+import com.mzl.flower.dto.request.content.AddFeedbackDTO;
+import com.mzl.flower.dto.request.content.QueryFeedBackDTO;
+import com.mzl.flower.dto.request.content.ReplyFeedbackDTO;
+import com.mzl.flower.dto.response.content.FeedbackDTO;
+import com.mzl.flower.service.content.FeedbackService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.http.ResponseEntity;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.constraints.NotNull;
+
+@RestController
+@RequestMapping("/api/feedback")
+@Api(value = "投诉反馈管理", tags = "投诉反馈管理")
+@Validated
+@Slf4j
+public class FeedbackController extends BaseController {
+
+    private final FeedbackService feedbackService;
+
+    public FeedbackController(FeedbackService feedbackService) {
+        this.feedbackService = feedbackService;
+    }
+
+    @PostMapping("/page/new")
+    @ApiOperation(value = "用户提交投诉反馈", notes = "提交投诉反馈")
+    public ResponseEntity<ReturnDataDTO> add(@Validated @RequestBody AddFeedbackDTO dto) {
+        feedbackService.add(dto);
+        return returnData(R.SUCCESS.getCode(),null);
+    }
+
+    @GetMapping("/my/feedback/list")
+    @ApiOperation(value = "用户查询我的投诉反馈", notes = "用户查询我的投诉反馈")
+    public ResponseEntity<ReturnDataDTO<Page<FeedbackDTO>>> queryMyPage(Page page) {
+        QueryFeedBackDTO dto = new QueryFeedBackDTO();
+        dto.setUserId(SecurityUtils.getUserId());
+        return returnData(R.SUCCESS.getCode(), feedbackService.queryPage(dto,page));
+    }
+
+
+    @GetMapping("/page/view")
+    @ApiOperation(value = "详情", notes = "详情")
+    public ResponseEntity<ReturnDataDTO<FeedbackDTO>> detail(@NotNull(message = "id不能为空") Long id) {
+        return returnData(R.SUCCESS.getCode(),feedbackService.detail(id));
+    }
+
+    @GetMapping("/page")
+    @ApiOperation(value = "运营查询-分页", notes = "查询-分页")
+    public ResponseEntity<ReturnDataDTO<Page<FeedbackDTO>>> queryPage(QueryFeedBackDTO dto, Page page) {
+        return returnData(R.SUCCESS.getCode(), feedbackService.queryPage(dto,page));
+    }
+
+    @PostMapping("/page/reply")
+    @ApiOperation(value = "运营回复投诉反馈", notes = "运营回复投诉反馈")
+    public ResponseEntity<ReturnDataDTO> reply(@Validated @RequestBody ReplyFeedbackDTO dto)  {
+        feedbackService.reply(dto);
+        return returnData(R.SUCCESS.getCode(), null);
+    }
+
+}

--
Gitblit v1.9.3