liyong
9 天以前 7661cf3c3725cd3a9057625ea4a5f1add9001f25
src/main/java/com/ruoyi/warehouse/controller/WarehouseGoodsShelvesController.java
@@ -23,13 +23,6 @@
public class WarehouseGoodsShelvesController extends BaseController {
    @Autowired
    private WarehouseGoodsShelvesService warehouseGoodsShelvesService;
    @GetMapping("/listPage")
    @ApiOperation("商品货架-分页查询")
    @Log(title = "商品货架-分页查询", businessType = BusinessType.OTHER)
    public AjaxResult listPage(Page page, WarehouseGoodsShelves warehouseGoodsShelves) {
        IPage<WarehouseGoodsShelves> listPage = warehouseGoodsShelvesService.listPage(page, warehouseGoodsShelves);
        return AjaxResult.success(listPage);
    }
    @GetMapping("/listById")
    @ApiOperation("商品货架-查询")
@@ -43,22 +36,19 @@
    @ApiOperation("商品货架-添加")
    @Log(title = "商品货架-添加", businessType = BusinessType.INSERT)
    public AjaxResult add(@RequestBody WarehouseGoodsShelves warehouseGoodsShelves) {
        boolean save = warehouseGoodsShelvesService.add(warehouseGoodsShelves);
        return save ? AjaxResult.success("添加成功") : AjaxResult.error("添加失败");
        return AjaxResult.success(warehouseGoodsShelvesService.add(warehouseGoodsShelves));
    }
    @PostMapping("/update")
    @ApiOperation("商品货架-更新")
    @Log(title = "商品货架-更新", businessType = BusinessType.UPDATE)
    public AjaxResult update(@RequestBody WarehouseGoodsShelves warehouseGoodsShelves) {
        boolean update = warehouseGoodsShelvesService.updateRowcolById(warehouseGoodsShelves);
        return update ? AjaxResult.success("更新成功") : AjaxResult.error("更新失败");
        return AjaxResult.success(warehouseGoodsShelvesService.updateRowcolById(warehouseGoodsShelves));
    }
    @DeleteMapping("/delete")
    @ApiOperation("商品货架-删除")
    @Log(title = "商品货架-删除", businessType = BusinessType.DELETE)
    public AjaxResult delete(@RequestBody List<Long> ids) {
        if(CollectionUtils.isEmpty(ids)) return AjaxResult.error("请传入要删除的ID");
        boolean remove = warehouseGoodsShelvesService.deleteByIds(ids);
        return remove ? AjaxResult.success("删除成功") : AjaxResult.error("删除失败");
        return  AjaxResult.success(warehouseGoodsShelvesService.deleteByIds(ids));
    }
}