whycxzp
2024-07-23 c33de1c323ecf239706fe79c25044236ebc827a8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package com.whyc.controller;
 
import com.whyc.dto.Response;
import com.whyc.dto.UpsAlarmDTO;
import com.whyc.pojo.UserInf;
import com.whyc.service.UpspwrdevAlarmService;
import com.whyc.service.UserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
 
import javax.annotation.Resource;
 
@RestController
@RequestMapping("upsAlm")
@Api(tags = "ups告警")
public class UpspwrdevAlarmController {
    @Resource
    private UpspwrdevAlarmService service;
 
    @PostMapping("getAlmReal")
    @ApiOperation(value = "ups告警推送实时数据")
    public Response getAlmReal(@RequestBody UpsAlarmDTO upsAlarmDTO){
        return service.getAlmReal(upsAlarmDTO);
    }
 
    @GetMapping("setAlmIsConfirmed")
    @ApiOperation(value = "ups告警确认")
    public Response setAlmIsConfirmed(@RequestParam int num){
        return service.setAlmIsConfirmed(num);
    }
    @GetMapping("cancleAlmIsConfirmed")
    @ApiOperation(value = "ups告警取消")
    public Response cancleAlmIsConfirmed(@RequestParam int num){
        return service.cancleAlmIsConfirmed(num);
    }
 
    @GetMapping("delAlm")
    @ApiOperation(value = "ups告警删除")
    public Response delAlm(@RequestParam int num){
        return service.delAlm(num);
    }
}