whycxzp
2023-01-12 b6b75f791dbc63a82918e537762d3f9b6b55ccd4
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
package com.whyc.controller;
 
import com.whyc.dto.Response;
import com.whyc.pojo.PwrdevAlarmConfig;
import com.whyc.service.PowerAlarmConfigService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
/**
 * 声光报警/蜂鸣器
 */
@RequestMapping("powerAlarmConfig")
@RestController
@Api(tags = "电源告警配置")
public class PowerAlarmConfigController {
 
    @Autowired
    private PowerAlarmConfigService service;
 
    @ApiOperation("获取配置信息")
    @GetMapping("getInfo")
    public Response getInfo(){
        return service.getInfo();
    }
 
    @ApiOperation("设置配置信息")
    @PostMapping("update")
    public Response update(@RequestBody PwrdevAlarmConfig config){
        return service.update(config);
    }
}