package com.wms_main.controller.wms;

import com.wms_main.model.dto.query.GoodsQuery;
import com.wms_main.model.vo.wms.GoodsVo;
import com.wms_main.model.vo.wms.PageVo;
import com.wms_main.model.dto.response.wms.WmsApiResponse;
import com.wms_main.service.controller.IGoodsControllerService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

/**
 * 物料控制类
 */
@RestController
@ResponseBody
@CrossOrigin
@RequiredArgsConstructor
@RequestMapping("/wms/goods")
public class GoodsController {
    private final IGoodsControllerService goodsControllerService;

    /**
     * 根据条件查询物料信息---分页
     * @param goodsQuery 查询参数
     * @return 查询结果
     */
    @PostMapping("/getGoodsInfoByPage")
    public WmsApiResponse<PageVo<GoodsVo>> getGoodsInfoByPage(@RequestBody GoodsQuery goodsQuery) {
        return goodsControllerService.getGoodsInfoByPage(goodsQuery);
    }
}
