whycxzp
2023-08-18 aa4b2e892e5a348b550071b8e71a38fce3dcd473
待确认告警类型列表
2个文件已修改
17 ■■■■■ 已修改文件
src/main/java/com/whyc/controller/AppAlmParamController.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/service/AppAlmParamService.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/controller/AppAlmParamController.java
@@ -27,6 +27,13 @@
        return new Response<Map<Integer, Map<Integer, List<AppAlmParam>>>>().set(1,map);
    }
    @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(){
src/main/java/com/whyc/service/AppAlmParamService.java
@@ -4,7 +4,6 @@
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.whyc.mapper.AppAlmParamMapper;
import com.whyc.pojo.AppAlmParam;
import com.whyc.pojo.PageParam;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -46,4 +45,13 @@
    public List<AppAlmParam> getAllList2() {
        return mapper.selectList(null);
    }
    public List<Integer> getListToBeConfirmed(Integer type) {
        QueryWrapper<AppAlmParam> query = Wrappers.query();
        if(type != 0){ // 0,查全部
            query.eq("alm_category",type);
        }
        query.eq("alm_auto_clear_en",0);
        return mapper.selectList(query).stream().map(AppAlmParam::getAlmId).collect(Collectors.toList());
    }
}