lxw
2023-09-04 cbc09e1b6ce4c6674d75a96982848af6572f32b9
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
package com.whyc.controller;
 
import com.whyc.dto.Response;
import com.whyc.pojo.BattGroupGuides;
import com.whyc.service.BattGroupGuidesService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
@RestController
@RequestMapping("battGroupGuides")
@Api(tags = "电池组属性参考线")
public class BattGroupGuidesController {
 
    @Autowired
    private BattGroupGuidesService service;
 
    @GetMapping
    @ApiOperation(value = "电池组的各属性参考线获取")
    public Response getAll(@RequestParam int battGroupId){
        BattGroupGuides guides = service.getAll(battGroupId);
        return new Response().set(1,guides);
    }
 
    @PutMapping
    @ApiOperation(value = "电池组的参考线设置")
    public Response update(@RequestBody BattGroupGuides guides){
        service.update(guides);
        return new Response().set(1,true,"设置完成");
    }
}