| | |
| | | package com.ruoyi.warehouse.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.ruoyi.warehouse.pojo.Warehouse; |
| | | import com.ruoyi.warehouse.pojo.WarehouseGoodsShelves; |
| | | import com.ruoyi.warehouse.service.WarehouseGoodsShelvesService; |
| | | import com.ruoyi.warehouse.service.WarehouseService; |
| | | import io.swagger.annotations.Api; |
| | |
| | | @Autowired |
| | | private WarehouseService warehouseService; |
| | | |
| | | |
| | | @GetMapping("/listPage") |
| | | @ApiOperation("仓库-查询") |
| | | @Log(title = "仓库-查询", businessType = BusinessType.OTHER) |
| | |
| | | @ApiOperation("仓库-添加") |
| | | @Log(title = "仓库-添加", businessType = BusinessType.INSERT) |
| | | public AjaxResult add(@RequestBody Warehouse warehouse) { |
| | | return warehouseService.save(warehouse) ? AjaxResult.success("添加成功") : AjaxResult.error("添加失败"); |
| | | return AjaxResult.success(warehouseService.save(warehouse)); |
| | | } |
| | | |
| | | @PostMapping("/update") |
| | |
| | | @Log(title = "仓库-删除", businessType = BusinessType.DELETE) |
| | | public AjaxResult delete(@RequestBody List<Long> ids) { |
| | | if(CollectionUtils.isEmpty(ids)) return AjaxResult.error("请传入要删除的ID"); |
| | | return warehouseService.deleteByIds(ids) ? AjaxResult.success("删除成功") : AjaxResult.error("删除失败"); |
| | | return AjaxResult.success(warehouseService.deleteByIds(ids)); |
| | | } |
| | | } |