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()); } }