whyclxw
2025-05-28 e16302f9d475c7cc4dd18c5abf1a23cb5502e362
src/main/java/com/whyc/controller/AppAlmParamController.java
@@ -22,17 +22,38 @@
    @GetMapping("allList")
    @ApiOperation(value = "查询待添加和已添加参数列表")
    public Response<Map<Integer, List<AppAlmParam>>> getAllList(@RequestParam int categoryId){
        Map<Integer, List<AppAlmParam>> map = service.getAllList(categoryId);
        return new Response<Map<Integer, List<AppAlmParam>>>().set(1,map);
    public Response<Map<Integer, Map<Integer, List<AppAlmParam>>>> getAllList(){
        Map<Integer, Map<Integer, List<AppAlmParam>>> map = service.getAllList();
        return new Response<Map<Integer, Map<Integer, List<AppAlmParam>>>>().set(1,map);
    }
    @PutMapping("list")
    @GetMapping("listToBeConfirmed")
    @ApiOperation(value = "查询待确认的告警类型列表")
    public Response<List<Integer>> getListToBeConfirmed(@RequestParam Integer type){
        List<Integer> list = service.getListToBeConfirmed(type);
        return new Response<List<Integer>>().set(1,list);
    }
    @GetMapping("allList2")
    @ApiOperation(value = "查询参数列表")
    public Response<List<AppAlmParam>> getAllList2(){
        List<AppAlmParam> list = service.getAllList2();
        return new Response<List<AppAlmParam>>().set(1,list);
    }
    @PostMapping("list")
    @ApiOperation(value = "添加或者移除参数配置")
    public Response updateList(@RequestParam int operationFlag,@RequestBody List<AppAlmParam> paramList){
        service.updateList(paramList,operationFlag);
        return new Response().setII(1,"更新成功");
    }
    @PostMapping("list2")
    @ApiOperation(value = "更新参数配置")
    public Response updateList2(@RequestBody List<AppAlmParam> paramList){
        service.updateList2(paramList);
        return new Response().setII(1,"更新成功");
    }
}