package com.whyc.controller;
|
|
import com.whyc.dto.Response;
|
import com.whyc.pojo.AppAlmParam;
|
import com.whyc.pojo.PageParam;
|
import com.whyc.service.AppAlmParamService;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.*;
|
|
import java.util.List;
|
import java.util.Map;
|
|
@RestController
|
@RequestMapping("appAlmParam")
|
@Api(tags = "告警消失参数设置")
|
public class AppAlmParamController {
|
|
@Autowired
|
private AppAlmParamService service;
|
|
@GetMapping("allList")
|
@ApiOperation(value = "查询待添加和已添加参数列表")
|
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")
|
@ApiOperation(value = "添加或者移除参数配置")
|
public Response updateList(@RequestParam int operationFlag,@RequestBody List<AppAlmParam> paramList){
|
service.updateList(paramList,operationFlag);
|
return new Response().setII(1,"更新成功");
|
}
|
|
@PutMapping("list2")
|
@ApiOperation(value = "更新参数配置")
|
public Response updateList2(@RequestBody List<AppAlmParam> paramList){
|
service.updateList2(paramList);
|
return new Response().setII(1,"更新成功");
|
}
|
|
|
}
|