From 1de3b3fe57cd58e76c90fb33d4cdedc67c246a58 Mon Sep 17 00:00:00 2001
From: wl <173@qq.com>
Date: 星期五, 15 七月 2022 11:50:47 +0800
Subject: [PATCH] 案件区报案人员相关接口

---
 src/main/java/com/example/jz/controller/CauseController.java |   32 ++++++++++++++++++++++++++++----
 1 files changed, 28 insertions(+), 4 deletions(-)

diff --git a/src/main/java/com/example/jz/controller/CauseController.java b/src/main/java/com/example/jz/controller/CauseController.java
index 43fe51b..2609aba 100644
--- a/src/main/java/com/example/jz/controller/CauseController.java
+++ b/src/main/java/com/example/jz/controller/CauseController.java
@@ -20,7 +20,7 @@
  */
 @RestController
 @RequestMapping("cause")
-@Api(tags = "妗堜欢鍖�")
+@Api(tags = "妗堜欢鍖�-妗堜欢褰曞叆")
 public class CauseController extends ApiController {
     /**
      * 鏈嶅姟瀵硅薄
@@ -32,11 +32,12 @@
     @PostMapping("/addCause")
     @ApiResponse(message = "鎵ц鎴愬姛", code = 200)
     public R addCause(@RequestBody CauseDto causeDto) {
-        return R.ok(causeService.addCause(causeDto));
+        causeService.addCause(causeDto);
+        return R.ok();
     }
 
-    @ApiOperation(httpMethod = "POST", value = "淇敼妗堜欢")
-    @PostMapping("/updateCause")
+    @ApiOperation(httpMethod = "PUT", value = "淇敼妗堜欢")
+    @PutMapping("/updateCause")
     @ApiResponse(message = "鎵ц鎴愬姛", code = 200)
     public R updateCause(@RequestBody CauseDto causeDto,Integer id) {
         return R.ok(causeService.updateCause(causeDto,id));
@@ -56,5 +57,28 @@
     public R getManagerList() {
         return R.ok(causeService.getManagerList());
     }
+
+    @ApiOperation(httpMethod = "GET", value = "鑾峰彇鎶ユ浜哄憳")
+    @GetMapping("/getReporterList")
+    @ApiResponse(message = "鎵ц鎴愬姛", code = 200)
+    public R getReporterList(Integer causeId) {
+        return R.ok(causeService.getReporterList(causeId));
+    }
+
+    @ApiOperation(httpMethod = "GET", value = "鑾峰彇妗堜欢缇ゅ叕鍛�")
+    @GetMapping("/getGroupAnnouncement")
+    @ApiResponse(message = "鎵ц鎴愬姛", code = 200)
+    public R getGroupAnnouncement(Integer groupId) {
+        return R.ok(causeService.getGroupAnnouncement(groupId));
+    }
+
+    @ApiOperation(httpMethod = "DELETE", value = "妗堜欢鍒犻櫎")
+    @DeleteMapping("/deleteCause")
+    @ApiResponse(message = "鎵ц鎴愬姛", code = 200)
+    public R deleteCause(@RequestParam(value = "id") Integer id) {
+        causeService.deleteCause(id);
+        return R.ok();
+    }
+    // TODO: 2022/7/15 瀵煎叆
 }
 

--
Gitblit v1.8.0