| | |
| | | import com.fgkj.services.Alarm_paramService; |
| | | import com.fgkj.services.User_logService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.validation.Valid; |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | @RequestMapping("alarmParam") |
| | | @RestController |
| | | @Api |
| | | @Api(tags = "alarmParam接口") |
| | | public class Alarm_paramController { |
| | | |
| | | @Resource |
| | |
| | | private User_logService uservice; |
| | | |
| | | @PostMapping("/") |
| | | @ApiOperation(notes = "",value="新增") |
| | | public ServiceModel add(@RequestBody Alarm_param param){ |
| | | ServiceModel model = service.add(param); |
| | | |
| | |
| | | |
| | | //编辑参数 |
| | | @PutMapping("/") |
| | | @ApiOperation(notes = "",value="编辑参数") |
| | | public ServiceModel update(@RequestBody Alarm_param param){ |
| | | ServiceModel model = service.update(param); |
| | | { |
| | |
| | | } |
| | | |
| | | @DeleteMapping("/") |
| | | public ServiceModel del(@RequestBody Alarm_param param){ |
| | | @ApiOperation(notes = "",value="删除") |
| | | public ServiceModel del(@NotNull @RequestParam Integer num){ |
| | | Alarm_param param = new Alarm_param(); |
| | | param.setNum(num); |
| | | ServiceModel model = service.del(param); |
| | | |
| | | return model; |
| | | } |
| | | |
| | | @GetMapping("all") |
| | | @ApiOperation(notes = "",value="all") |
| | | public ServiceModel searchAll(){ |
| | | ServiceModel model = service.searchAll(); |
| | | |
| | |
| | | } |
| | | |
| | | //7.1根据告警类型查告警参数 |
| | | @GetMapping("byCondition") |
| | | public ServiceModel serchByCondition(@RequestBody Alarm_param param){ |
| | | @PostMapping("/byCondition") |
| | | @ApiOperation(notes = "",value="根据告警类型查告警参数") |
| | | public ServiceModel serchByCondition(@NotNull @RequestParam Integer alm_id){ |
| | | System.out.println("alm_id = " + alm_id); |
| | | Alarm_param param =new Alarm_param(); |
| | | param.setAlm_id(alm_id); |
| | | ServiceModel model = service.serchByCondition(param); |
| | | |
| | | return model; |