wl
2022-10-01 c16af2071132ba087a3219d13e82a7504f050426
bug 处理
2个文件已修改
22 ■■■■ 已修改文件
ycl-common/src/main/java/com/ycl/controller/depart/DepartController.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/controller/caseHandler/BaseCaseController.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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("详情")
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~!");
    }
}
}