whycxzp
2025-04-23 c330e65b8ea172fface685efaa8e9c2e8a7f9520
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
44
45
46
47
48
49
50
51
52
53
54
package com.whyc.controller;
 
import com.whyc.dto.Response;
import com.whyc.pojo.db_batt.BattInf;
import com.whyc.service.BattInfService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
/**
 * 弃用,整合到电源信息表了
 */
@Deprecated
@RestController
@Api(tags = "电池信息")
@RequestMapping("battInf")
public class BattInfController {
 
    @Autowired
    private BattInfService service;
 
    @ApiOperation("新增")
    @PostMapping("add")
    public Response add(@RequestBody BattInf battInf){
        return service.add(battInf);
    }
 
    @ApiOperation("删除")
    @PostMapping("delete")
    public Response delete(@RequestParam int battGroupId){
        return service.delete(battGroupId);
    }
 
    @ApiOperation("修改")
    @PostMapping("update")
    public Response update(@RequestBody BattInf battInf){
        return service.update(battInf);
    }
 
    @ApiOperation("查询-分页")
    @GetMapping("getPage")
    public Response getPage(@RequestParam int pageNum,@RequestParam int pageSize){
        return service.getPage(pageNum,pageSize);
    }
 
    @ApiOperation("查询-根据id")
    @GetMapping("getById")
    public Response getById(@RequestParam int battGroupId){
        return service.getById(battGroupId);
    }
 
 
}