liyong
2026-05-15 76c84d95506998f546e6f3ebbf70414c0dd9da9d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
package com.ruoyi.stock.controller;
 
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.framework.web.domain.R;
import com.ruoyi.stock.dto.WarehouseInfoDto;
import com.ruoyi.stock.pojo.WarehouseInfo;
import com.ruoyi.stock.service.WarehouseInfoService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;
 
import java.util.ArrayList;
 
/**
 * <p>
 * 仓库信息表 前端控制器
 * </p>
 *
 * @author 芯导软件(江苏)有限公司
 * @since 2026-05-12 05:44:22
 */
@RestController
@RequestMapping("/warehouseInfo")
@AllArgsConstructor
@Tag(name = "仓库信息表")
public class WarehouseInfoController {
 
    private final WarehouseInfoService warehouseInfoService;
 
    @GetMapping("/listPage")
    @Operation(summary = "分页查询")
    public R listPage(Page  page, WarehouseInfoDto warehouseInfoDto) {
        return R.ok(warehouseInfoService.listPage(page, warehouseInfoDto));
    }
 
    @PostMapping("/add")
    @Operation(summary = "添加")
    public R add(@RequestBody WarehouseInfoDto warehouseInfoDto) {
        return R.ok(warehouseInfoService.save(warehouseInfoDto));
    }
 
    @PostMapping("/edit")
    @Operation(summary = "修改")
    public R edit(@RequestBody WarehouseInfoDto warehouseInfoDto) {
        return R.ok(warehouseInfoService.updateById(warehouseInfoDto));
    }
 
 
    @PostMapping("/delete")
    @Operation(summary = "删除")
    public R delete(@RequestBody ArrayList<Long> ids) {
        return R.ok(warehouseInfoService.deleteByIds(ids));
    }
 
 
    @GetMapping("/list")
    @Operation(summary = "查询仓库信息")
    public R list() {
        return R.ok(warehouseInfoService.list(new LambdaQueryWrapper<WarehouseInfo>().eq(WarehouseInfo::getStatus, true)));
    }
}