whycxzp
2021-07-26 8c189b243bfbbacb2ab1ce79f4e1ff22708f125a
src/main/java/com/whyc/controller/RectifierPowerCtrlController.java
@@ -1,13 +1,35 @@
package com.whyc.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.whyc.dto.Response;
import com.whyc.pojo.RectifierPowerControl;
import com.whyc.service.RectifierPowerCtrlService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
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
@RequestMapping("rectifierPowerCtrl")
@Api(tags = "大功率整流电源-控制状态")
@Api(tags = "大功率整流电源-控制")
public class RectifierPowerCtrlController {
    @Autowired
    private RectifierPowerCtrlService service;
    @GetMapping("all")
    @ApiOperation(value = "获取所有信息")
    public Response<IPage<RectifierPowerControl>> getAll(@RequestParam int pageNum, int pageSize){
        return service.getAll(pageNum,pageSize);
    }
    @GetMapping("infoByDevId")
    @ApiOperation(value = "获取单个信息:根据设备id")
    public Response<RectifierPowerControl> getInfoByDevId(@RequestParam int devId){
        return service.getInfoByDevId(devId);
    }
}