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

@Repository
public interface PurchaseMRBDao extends JpaSpecificationExecutor<PurchaseMRB>, JpaRepository<PurchaseMRB, Long> {

	/**
	 * 按所属企业及编号查找MRB单
	 * 
	 * @param enUU
	 * @param code
	 * @return
	 */
	public List<PurchaseMRB> findPurchaseMRBByEnUUAndCode(Long enUU, String code);
	
	/**
	 * 卖家根据卖家UU号和下载状态获取需要下载的客户MRB单
	 * @return
	 */
	public List<PurchaseMRB> findPurchaseMRBByVendUUAndSendStatus(Long vendUU, Short sendStatus);

}
