yaowanxin
9 天以前 7d188cc913d5ea547c5e99ae434ea3b1cf4e818a
src/main/java/com/ruoyi/warehouse/controller/WarehouseGoodsShelvesRowcolController.java
@@ -25,36 +25,39 @@
    private WarehouseGoodsShelvesRowcolService warehouseGoodsShelvesRowcolService;
    @Autowired
    private WarehouseGoodsShelvesRowcolMapper warehouseGoodsShelvesRowcolMapper;
    @GetMapping("/listPage")
    @ApiOperation("商品货架行列-分页查询")
    @Log(title = "商品货架行列-分页查询", businessType = BusinessType.OTHER)
    public AjaxResult listPage(Page page, WarehouseGoodsShelvesRowcol warehouseGoodsShelvesRowcol) {
        IPage<WarehouseGoodsShelvesRowcol> listPage = warehouseGoodsShelvesRowcolService.listPage(page, warehouseGoodsShelvesRowcol);
        return AjaxResult.success(listPage);
    @GetMapping("/list")
    @ApiOperation("商品货架行列-查询")
    @Log(title = "商品货架行列-查询", businessType = BusinessType.OTHER)
    public AjaxResult list() {
        List<WarehouseGoodsShelvesRowcol> list = warehouseGoodsShelvesRowcolService.list();
        return AjaxResult.success(list);
    }
    @PostMapping("/add")
    @ApiOperation("商品货架行列-添加")
    @Log(title = "商品货架行列-添加", businessType = BusinessType.INSERT)
    public AjaxResult add(@RequestBody WarehouseGoodsShelvesRowcol warehouseGoodsShelvesRowcol) {
        boolean save = warehouseGoodsShelvesRowcolService.save(warehouseGoodsShelvesRowcol);
        return save ? AjaxResult.success("添加成功") : AjaxResult.error("添加失败");
    }
    @PostMapping("/update")
    @ApiOperation("商品货架行列-更新")
    @Log(title = "商品货架行列-更新", businessType = BusinessType.UPDATE)
    public AjaxResult update(@RequestBody WarehouseGoodsShelvesRowcol warehouseGoodsShelvesRowcol) {
        boolean up = warehouseGoodsShelvesRowcolService.updateById(warehouseGoodsShelvesRowcol);
        return up ? AjaxResult.success("更新成功") : AjaxResult.error("更新失败");
    }
    @PostMapping("/delete")
    @ApiOperation("商品货架行列-删除")
    @Log(title = "商品货架行列-删除", businessType = BusinessType.DELETE)
    public AjaxResult delete(@RequestBody List<Long> ids) {
        if(CollectionUtils.isEmpty(ids)) return AjaxResult.error("请传入要删除的ID");
        boolean remove = warehouseGoodsShelvesRowcolService.deleteByIds(ids);
        return remove ? AjaxResult.success("删除成功") : AjaxResult.error("删除失败");
    }
//    @GetMapping("/listPage")
//    @ApiOperation("商品货架行列-分页查询")
//    @Log(title = "商品货架行列-分页查询", businessType = BusinessType.OTHER)
//    public AjaxResult listPage(Page page, WarehouseGoodsShelvesRowcol warehouseGoodsShelvesRowcol) {
//        IPage<WarehouseGoodsShelvesRowcol> listPage = warehouseGoodsShelvesRowcolService.listPage(page, warehouseGoodsShelvesRowcol);
//        return AjaxResult.success(listPage);
//    }
//    @PostMapping("/add")
//    @ApiOperation("商品货架行列-添加")
//    @Log(title = "商品货架行列-添加", businessType = BusinessType.INSERT)
//    public AjaxResult add(@RequestBody WarehouseGoodsShelvesRowcol warehouseGoodsShelvesRowcol) {
//        return AjaxResult.success(warehouseGoodsShelvesRowcolService.save(warehouseGoodsShelvesRowcol));
//    }
//    @PostMapping("/update")
//    @ApiOperation("商品货架行列-更新")
//    @Log(title = "商品货架行列-更新", businessType = BusinessType.UPDATE)
//    public AjaxResult update(@RequestBody WarehouseGoodsShelvesRowcol warehouseGoodsShelvesRowcol) {
//        return AjaxResult.success(warehouseGoodsShelvesRowcolService.updateById(warehouseGoodsShelvesRowcol));
//    }
//    @PostMapping("/delete")
//    @ApiOperation("商品货架行列-删除")
//    @Log(title = "商品货架行列-删除", businessType = BusinessType.DELETE)
//    public AjaxResult delete(@RequestBody List<Long> ids) {
//        if(CollectionUtils.isEmpty(ids)) return AjaxResult.error("请传入要删除的ID");
//        return AjaxResult.success(warehouseGoodsShelvesRowcolService.removeByIds(ids));
//    }
}