whyczh
2021-04-28 e8514175f6cf73c5d006ec4d253afb46b18f1840
src/main/java/com/whyc/controller/RectifierPowerCtrlController.java
@@ -1,7 +1,15 @@
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
@@ -9,5 +17,19 @@
@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);
    }
}