whyclxw
2025-05-14 35838dd80eff7d45b6cb67e3b1ff22d432305f0e
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.PowerDto;
import com.whyc.dto.Response;
import com.whyc.pojo.db_station.PowerInf;
import com.whyc.service.PowerInfService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
@RestController
@Api(tags = "电源管理")
@RequestMapping("powerInf")
public class PowerInfController {
    @Autowired
    private PowerInfService service;
 
 
    @ApiOperation(value = "添加机房")
    @PostMapping("addPower")
    public Response addPower(@RequestBody PowerInf pinf){
        return service.addPower(pinf);
    }
 
    @ApiOperation(value = "删除机房")
    @GetMapping("delPower")
    public Response delPower(@RequestParam Integer pid){
        return service.delPower(pid);
    }
 
    @ApiOperation(value = "修改机房")
    @PostMapping("updatePower")
    public Response updatePower(@RequestBody PowerInf pinf){
        return service.updatePower(pinf);
    }
 
    @ApiOperation(value = "查询机房")
    @PostMapping("getPower")
    public Response getPower(@RequestBody PowerDto dto){
        return service.getPower(dto);
    }
}