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-platform/src/main/java/com/ycl/controller/caseHandler/BaseCaseController.java | 14 ++++++-------- 1 files changed, 6 insertions(+), 8 deletions(-) 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