From c16af2071132ba087a3219d13e82a7504f050426 Mon Sep 17 00:00:00 2001
From: wl <173@qq.com>
Date: 星期六, 01 十月 2022 22:23:10 +0800
Subject: [PATCH] bug 处理
---
ycl-common/src/main/java/com/ycl/controller/depart/DepartController.java | 8 +++++---
ycl-platform/src/main/java/com/ycl/controller/caseHandler/BaseCaseController.java | 14 ++++++--------
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/ycl-common/src/main/java/com/ycl/controller/depart/DepartController.java b/ycl-common/src/main/java/com/ycl/controller/depart/DepartController.java
index 568784a..bcd0613 100644
--- a/ycl-common/src/main/java/com/ycl/controller/depart/DepartController.java
+++ b/ycl-common/src/main/java/com/ycl/controller/depart/DepartController.java
@@ -69,9 +69,11 @@
**/
@ApiOperation("鎵瑰鐞�-鍒犻櫎")
@PostMapping(value = "/batch_deletion")
- public CommonResult<Void> delete(@RequestParam Integer[] ids) {
- departService.removeBatchByIds(Arrays.asList(ids));
- return CommonResult.success(null);
+ public CommonResult delete(@RequestParam List<Long> ids) {
+ if (ids.isEmpty()){
+ return CommonResult.failed("bad request parameter");
+ }
+ return CommonResult.success(departService.removeBatchByIds(ids));
}
@ApiOperation("璇︽儏")
diff --git a/ycl-platform/src/main/java/com/ycl/controller/caseHandler/BaseCaseController.java b/ycl-platform/src/main/java/com/ycl/controller/caseHandler/BaseCaseController.java
index f2f86fd..5e4c11d 100644
--- a/ycl-platform/src/main/java/com/ycl/controller/caseHandler/BaseCaseController.java
+++ b/ycl-platform/src/main/java/com/ycl/controller/caseHandler/BaseCaseController.java
@@ -24,7 +24,6 @@
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
-import java.util.Arrays;
import java.util.List;
import java.util.UUID;
@@ -140,17 +139,16 @@
@ApiImplicitParams({
@ApiImplicitParam(name = "type", value = "1 杩濊,2 杩濆缓", dataType = "Integer")
})
- public CommonResult removeCases(@RequestParam Long[] ids, @RequestParam Integer type) {
+ public CommonResult removeCases(@RequestParam List<Long> ids, @RequestParam Integer type) {
Integer violationType = 1;
Integer illegalBuildingType = 2;
- List<Long> idList = Arrays.asList(ids);
- if (!idList.isEmpty()) {
+ if (!ids.isEmpty()) {
if (type == violationType) {
- return CommonResult.success(violationsService.removeBatchByIds(idList));
+ return CommonResult.success(violationsService.removeBatchByIds(ids));
} else if (type == illegalBuildingType) {
- return CommonResult.success(illegalBuildingService.removeBatchByIds(idList));
+ return CommonResult.success(illegalBuildingService.removeBatchByIds(ids));
}
- return CommonResult.success(baseCaseService.removeBatchByIds(idList));
+ return CommonResult.success(baseCaseService.removeBatchByIds(ids));
}
return CommonResult.failed("request parameter is null");
}
@@ -257,4 +255,4 @@
baseCaseService.endCase(caseId, result);
return CommonResult.success("end case success~!");
}
-}
+}
\ No newline at end of file
--
Gitblit v1.8.0