package com.sunxung.factoring.mapper.underlying;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sunxung.factoring.entity.underlying.UnderlyingGoodsInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Description : 底层货物信息Mapper类
 * @Author : L.Jia
 * @Date: 2022-03-04 15:09
 */
@Mapper
public interface UnderlyingGoodsInfoMapper extends BaseMapper<UnderlyingGoodsInfo> {

    /**
     * 根据验收单或者结算Id集合查询未驳回的货物
     *
     * @param acceptanceBasicInfoIds
     * @param settlementBasicInfoIds
     * @return
     */
    List<UnderlyingGoodsInfo> findByBasicIds(@Param("acceptanceBasicInfoIds") List<Long> acceptanceBasicInfoIds,
                                             @Param("settlementBasicInfoIds") List<Long> settlementBasicInfoIds);

    /**
     * 根据验收单id获取底层货物
     * @param acceptanceBasicInfoId
     * @return
     */
    List<UnderlyingGoodsInfo> listByAcceptanceId(Long acceptanceBasicInfoId);
}
