whycxzp
2021-03-25 4114bc3c704e8e64b562a4d215d5d4dddd5e6cc6
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
package com.whyc.controller;
 
import com.whyc.dto.Response;
import com.whyc.pojo.DeviceManage;
import com.whyc.service.DeviceManageService;
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("deviceManage")
@Api(tags = "设备管理")
public class DeviceManageController {
 
    @Autowired
    private DeviceManageService service;
 
    @PostMapping
    @ApiOperation(value="添加-入库")
    public Response add(@RequestBody DeviceManage deviceManage){
        return service.add(deviceManage);
    }
 
    @PutMapping
    @ApiOperation(value="报废-出库")
    public Response delete(@RequestParam Integer deviceId){
        return service.delete(deviceId);
    }
 
    @PutMapping
    @ApiOperation(value = "编辑")
    public Response update(@RequestBody DeviceManage deviceManage){
        return service.update(deviceManage);
    }
 
}