package com.jeeplus.pubmodules.wareHouse.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jeeplus.pubmodules.wareHouse.domain.WareHouseSummary;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author: 王强
 * @create: 2022-12-30 10:07
 **/
public interface WareHouseSummaryMapper extends BaseMapper<WareHouseSummary> {
    /**
     * 根据入库类型和商品名称查询库存数量
     * @param tradeName
     * @param wareHouseType
     * @return
     */
    Double getInfoByTradeName(@Param("tradeName") String tradeName,
                                         @Param("wareHouseType") String wareHouseType);

    /**
     * 根据入库基础表id查出汇总表数据
     * @param id
     * @return
     */
    List<WareHouseSummary> getInfoByBasicId(String id);

    void deleteByDetailedId(String id);
}
