he wei
2024-08-29 9fbb4817d103b9ba82a6e221631d95dcb87ab9a4
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
package com.whyc.controller;
 
import com.whyc.dto.Page;
import com.whyc.dto.Response;
import com.whyc.pojo.db_lithium_ram_db.DevInf;
import com.whyc.service.DevInfService;
import com.whyc.service.UserInfService;
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("devInf")
public class DevInfController {
    @Autowired
    private DevInfService service;
 
    @ApiOperation(value = "添加设备")
    @PostMapping("addDev")
    public Response addDev(@RequestBody DevInf devInf){
        return service.addDev(devInf);
    }
 
    @ApiOperation(value = "获取设备信息")
    @PostMapping("getAllInf")
    public Response getAllInf(@RequestBody Page page){
        return service.getAllInf(101,page);
    }
 
    @ApiOperation(value = "获取左侧列表")
    @GetMapping("getDevBytype")
    public Response getDevBytype(@RequestParam(required = false) Integer devType){
        return service.getDevBytype(devType);
    }
}