huminmin
6 天以前 d06ef3f44d6dc19dae223ab420165369ea13cc16
src/main/java/com/ruoyi/warehouse/controller/WarehouseGoodsShelvesController.java
@@ -4,7 +4,7 @@
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.ruoyi.framework.web.domain.R;
import com.ruoyi.warehouse.dto.WarehouseGoodsShelvesDto;
import com.ruoyi.warehouse.pojo.WarehouseGoodsShelves;
import com.ruoyi.warehouse.service.WarehouseGoodsShelvesService;
@@ -25,27 +25,27 @@
    @GetMapping("/listById")
    @Operation(summary = "商品货架-查询")
    @Log(title = "商品货架-查询", businessType = BusinessType.OTHER)
    public AjaxResult listById(WarehouseGoodsShelves warehouseGoodsShelves) {
    public R<?> listById(WarehouseGoodsShelves warehouseGoodsShelves) {
        List<WarehouseGoodsShelvesDto> list = warehouseGoodsShelvesService.findList(warehouseGoodsShelves);
        return AjaxResult.success(list);
        return R.ok(list);
    }
    @PostMapping("/add")
    @Operation(summary = "商品货架-添加")
    @Log(title = "商品货架-添加", businessType = BusinessType.INSERT)
    public AjaxResult add(@RequestBody WarehouseGoodsShelves warehouseGoodsShelves) {
        return AjaxResult.success(warehouseGoodsShelvesService.add(warehouseGoodsShelves));
    public R<?> add(@RequestBody WarehouseGoodsShelves warehouseGoodsShelves) {
        return R.ok(warehouseGoodsShelvesService.add(warehouseGoodsShelves));
    }
    @PutMapping("/update")
    @Operation(summary = "商品货架-更新")
    @Log(title = "商品货架-更新", businessType = BusinessType.UPDATE)
    public AjaxResult update(@RequestBody WarehouseGoodsShelves warehouseGoodsShelves) {
        return AjaxResult.success(warehouseGoodsShelvesService.updateRowcolById(warehouseGoodsShelves));
    public R<?> update(@RequestBody WarehouseGoodsShelves warehouseGoodsShelves) {
        return R.ok(warehouseGoodsShelvesService.updateRowcolById(warehouseGoodsShelves));
    }
    @DeleteMapping("/delete")
    @Operation(summary = "商品货架-删除")
    @Log(title = "商品货架-删除", businessType = BusinessType.DELETE)
    public AjaxResult delete(@RequestBody List<Long> ids) {
        if(CollectionUtils.isEmpty(ids)) return AjaxResult.error("请传入要删除的ID");
        return  AjaxResult.success(warehouseGoodsShelvesService.deleteByIds(ids));
    public R<?> delete(@RequestBody List<Long> ids) {
        if(CollectionUtils.isEmpty(ids)) return R.fail("请传入要删除的ID");
        return  R.ok(warehouseGoodsShelvesService.deleteByIds(ids));
    }
}