package com.uas.platform.b2b.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import com.uas.platform.b2b.model.PurchaseNotice;

@Repository
public interface PurchaseNoticeDao extends JpaSpecificationExecutor<PurchaseNotice>, JpaRepository<PurchaseNotice, Long> {

	/**
	 * 按买家企业ID和送货提醒来源ID查找送货提醒单
	 * 
	 * @return
	 */
	List<PurchaseNotice> findByEnUUAndSourceId(long enUU, long sourceId);

	/**
	 * 按供应商企业ID和传输状态查找送货提醒单
	 * 
	 * @return
	 */
	List<PurchaseNotice> findByVendUUAndSendStatus(long vendUU, Short sendStatus);

	/**
	 * 按供应商企业ID、是否结案和结案状态查找送货提醒
	 * 
	 * @return
	 */
	List<PurchaseNotice> findByVendUUAndEndStatus(long vendUU, Short endStatus);

}
