| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.yuanchu.mom.pojo.Warehouse; |
| | | import com.yuanchu.mom.pojo.WarehouseShelf; |
| | | import com.yuanchu.mom.service.WarehouseService; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | 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; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @RequestMapping("/warehouse") |
| | | @RestController |
| | |
| | | return Result.success(warehouseService.selectWarehouse()); |
| | | } |
| | | |
| | | @PostMapping("/addShelf") |
| | | @ApiOperation("添加货架") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "name", name = "名称"), |
| | | @ApiImplicitParam(value = "row", name = "行"), |
| | | @ApiImplicitParam(value = "col", name = "列"), |
| | | @ApiImplicitParam(value = "warehouseId", name = "仓库id") |
| | | }) |
| | | public Result addShelf(@RequestBody WarehouseShelf warehouseShelf) { |
| | | return Result.success(warehouseService.addShelf(warehouseShelf)); |
| | | } |
| | | |
| | | @PostMapping("/delWarehouse") |
| | | @ApiOperation("删除仓库") |
| | | public Result delWarehouse(Integer id) { |
| | | return Result.success(warehouseService.delWarehouse(id)); |
| | | } |
| | | |
| | | @PostMapping("/upWarehouse") |
| | | @ApiOperation("修改仓库") |
| | | public Result upWarehouse(@RequestBody Warehouse warehouse) { |
| | | return Result.success(warehouseService.upWarehouse(warehouse)); |
| | | } |
| | | |
| | | } |