package com.fjhx.mapper.material;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fjhx.entity.material.Material;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fjhx.utils.wrapperUtil.IWrapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 物料 Mapper 接口
 * </p>
 *
 * @author ${author}
 * @since 2022-08-05
 */
public interface MaterialMapper extends BaseMapper<Material> {

    List<Map<String, Object>> getMaterialBySupplierId(@Param("supplierId") Long supplierId);

    Page<Map<String, Object>> getStockPage(@Param("page") Page<Object> page, @Param("ew") QueryWrapper<Object> wrapper);

    Page<Map<String, Object>> getMaterialAndStock(@Param("page") Page<Material> page, @Param("ew") IWrapper<Object> wrapper);

}
