李林
2024-04-06 c7e24959364e65e6632e71546d607433560bb403
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
package com.yuanchu.mom.controller;
 
import com.yuanchu.mom.service.WarehouseService;
import com.yuanchu.mom.vo.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
@RequestMapping("/warehouse")
@RestController
@AllArgsConstructor
@Api("样品仓库")
public class WarehouseController {
 
    private WarehouseService warehouseService;
 
    @PostMapping("/addWarehouse")
    @ApiOperation("添加仓库")
    public Result addWarehouse(String name) {
        return Result.success(warehouseService.addWarehouse(name));
    }
 
    @GetMapping("/selectWarehouse")
    @ApiOperation("查询仓库")
    public Result selectWarehouse() {
        return Result.success(warehouseService.selectWarehouse());
    }
 
}