| | |
| | | package com.ruoyi.management.controller; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.utils.page.PageDTO; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.management.domain.SlStoreManagement; |
| | | import com.ruoyi.management.domain.dto.QStoreManagementQuery; |
| | | import com.ruoyi.management.domain.dto.StoreManagementDTO; |
| | | import com.ruoyi.management.domain.dto.StoreManagementQuery; |
| | | import com.ruoyi.management.service.SlStoreManagementService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/sl-store-management") |
| | | @Api(value = "仓库管理接口", tags = "仓库管理接口", description = "仓库管理接口") |
| | | public class SlStoreManagementController { |
| | | @Resource |
| | | private SlStoreManagementService slStoreManagementService; |
| | | |
| | | @PostMapping("/getStoreManagementList") |
| | | @ApiOperation(value = "分页获取仓库管理") |
| | | public R<PageDTO<SlStoreManagement>> getStoreManagementList(@RequestBody StoreManagementQuery storeManagementQuery) { |
| | | return R.ok(slStoreManagementService.getStoreManagementList(storeManagementQuery)); |
| | | } |
| | | |
| | | @PostMapping("/addStoreManagement") |
| | | @ApiOperation(value = "添加/修改仓库管理") |
| | | public AjaxResult addStoreManagement(@RequestBody StoreManagementDTO storeManagementDTO) { |
| | | |
| | | return slStoreManagementService.addStoreManagement(storeManagementDTO); |
| | | } |
| | | |
| | | @ApiOperation("删除仓库管理") |
| | | @DeleteMapping("/{id}") |
| | | public R<?> delStoreManagement( |
| | | @ApiParam(name = "id", value = "仓库管理id", required = true) @PathVariable("id") Long id) { |
| | | SlStoreManagement byId = slStoreManagementService.getById(id); |
| | | byId.setDelFlag("1"); |
| | | slStoreManagementService.updateById(byId); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @GetMapping("/getStoreManagementOne/{id}") |
| | | @ApiOperation(value = "仓库管理詳情") |
| | | public R<SlStoreManagement> getStoreManagementOne( @ApiParam(name = "id", value = "仓库管理id", required = true) @PathVariable("id") Long id) { |
| | | return R.ok(slStoreManagementService.getById(id)); |
| | | } |
| | | |
| | | @PostMapping("/QueryStoreManagementList") |
| | | @ApiOperation(value = "根据条件仓库管理列表") |
| | | public R<List<SlStoreManagement>> QueryStoreManagementList(@RequestBody QStoreManagementQuery StoreManagementQuery) { |
| | | return R.ok(slStoreManagementService.QueryStoreManagementList(StoreManagementQuery)); |
| | | } |
| | | |
| | | } |