From 790b1289743814fc378ca62532d7be4534455668 Mon Sep 17 00:00:00 2001
From: mitao <2763622819@qq.com>
Date: 星期一, 17 三月 2025 14:48:36 +0800
Subject: [PATCH] bug修改
---
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/MgtComplaintController.java | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 52 insertions(+), 1 deletions(-)
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/MgtComplaintController.java b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/MgtComplaintController.java
index ffb3ffa..4abad54 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/MgtComplaintController.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/MgtComplaintController.java
@@ -1,9 +1,26 @@
package com.panzhihua.sangeshenbian.api;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.panzhihua.common.controller.BaseController;
+import com.panzhihua.common.model.vos.R;
+import com.panzhihua.common.model.vos.sangeshenbian.SystemUserVo;
+import com.panzhihua.sangeshenbian.model.query.ComplaintQuery;
+import com.panzhihua.sangeshenbian.model.vo.ComplaintVO;
+import com.panzhihua.sangeshenbian.service.IComplaintService;
+import com.panzhihua.sangeshenbian.warpper.MgtComplaintQuery;
import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Lazy;
+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;
+
+import java.io.IOException;
/**
* @author mitao
@@ -11,7 +28,41 @@
*/
@Api(tags = {"三个身边后台-诉求管理"})
@RequestMapping("/complaint")
+@RestController
@RequiredArgsConstructor(onConstructor_ = {@Lazy})
-public class MgtComplaintController {
+public class MgtComplaintController extends BaseController {
+ private final IComplaintService complaintService;
+ @ApiOperation("诉求列表")
+ @PostMapping("/page")
+ public R<Page<ComplaintVO>> pageList(@RequestBody MgtComplaintQuery query) {
+ SystemUserVo loginUserInfo = getLoginUserInfoSanGeShenBian();
+ return R.ok(complaintService.pageList(query,loginUserInfo));
+ }
+ @ApiOperation("诉求详情")
+ @GetMapping("/detail/{id}")
+ public R<ComplaintVO> detail(@ApiParam(name = "id", value = "诉求id", required = true) @PathVariable("id") Long id) {
+ return R.ok(complaintService.getDetailMgt(id));
+ }
+ @ApiOperation("导出")
+ @PostMapping("/export")
+ public void export(@RequestBody MgtComplaintQuery query) {
+ SystemUserVo loginUserInfo = getLoginUserInfoSanGeShenBian();
+ try {
+ complaintService.export(query,loginUserInfo);
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ @ApiOperation("社区问题单、问题处理单、协调通知单 下载")
+ @GetMapping("/download-file/{id}/{type}")
+ public void communityProblem(@ApiParam(name = "id", value = "诉求id", required = true) @PathVariable("id") Long id,
+ @ApiParam(name = "type", value = "类型:1:社区问题单 2:问题处理单 3:协调通知单", required = true) @PathVariable("type") Integer type) {
+ try {
+ complaintService.downloadFile(id, type);
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
}
--
Gitblit v1.7.1