whycxzp
2021-04-23 35c36b2fb55a7d4b3c72990f896f5994469d7527
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
package com.whyc.app.controller;
 
import com.whyc.dto.Response;
import com.whyc.pojo.AFEInverterControl;
import com.whyc.app.service.AFECtrlService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
 
@RestController("APP-AFECtrlController")
@RequestMapping("phoneafeCtrl")
@Api(tags = "afe变频器-控制状态")
public class AFECtrlController {
 
    @Qualifier("SER-AFECtrlService")
    @Autowired
    private AFECtrlService service;
 
    @GetMapping("stateAll")
    @ApiOperation(value = "获取所有控制状态信息")
    //public Response<IPage<AFEInverterControl>> stateAll(@RequestParam int pageNum, int pageSize){
    public Response<Object> stateAll(@RequestParam int pageNum, int pageSize){
        return service.stateAll(pageNum,pageSize);
    }
 
    @GetMapping("stateByDevId")
    @ApiOperation(value = "查询设备的控制状态信息")
    public Response<AFEInverterControl> state(@RequestParam int devId){
        return service.state(devId);
    }
 
}