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.PurchaseInquiry;

@Repository
public interface PurchaseInquiryDao extends JpaSpecificationExecutor<PurchaseInquiry>, JpaRepository<PurchaseInquiry, Long> {

	/**
	 * @param enUU
	 *            询价方企业ID
	 * @param code
	 *            流水号
	 * @return
	 */
	public List<PurchaseInquiry> findByEnUUAndCode(long enUU, String code);

	/**
	 * @param enUU
	 *            询价方企业ID
	 * @param sourceId
	 *            来源系统的单据ID
	 * @return
	 */
	public List<PurchaseInquiry> findByEnUUAndSourceId(long enUU, long sourceId);

}
