whycxzp
2025-05-29 356bf4cfcbee3e5af9192300bc85632d5b156f00
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
package com.whyc.controller;
 
import com.whyc.dto.Response;
import com.whyc.pojo.db_batt.StationPowerRelation;
import com.whyc.service.StationPowerRelationService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
@RestController
@Api(tags = "机房电源关系")
@RequestMapping("stationPowerRelation")
public class StationPowerRelationController {
 
    @Autowired
    private StationPowerRelationService service;
 
    @PostMapping("add")
    public Response add(@RequestBody StationPowerRelation relation){
        service.add(relation.getStationId(),relation.getPowerId());
        return new Response().setII(1,"新增完成");
    }
 
}