From 2918688dff476da47f17723ad136149f3bde4add Mon Sep 17 00:00:00 2001
From: wl <173@qq.com>
Date: 星期五, 15 七月 2022 10:27:28 +0800
Subject: [PATCH] 案件区案件录入相关接口
---
src/main/java/com/example/jz/controller/CauseController.java | 31 +++++++++++++++++++++++++++----
1 files changed, 27 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..67f349e 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,27 @@
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();
+ }
}
--
Gitblit v1.8.0