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

@Repository
public interface PurchaseOrderAllDao extends JpaSpecificationExecutor<PurchaseOrderAll>, JpaRepository<PurchaseOrderAll, Long> {

	/**
	 * @param vendUU
	 *            卖方企业ID
	 * @param code
	 *            订单号
	 * @return
	 */
	public List<PurchaseOrderAll> findByVendUUAndCode(long vendUU, String code);

	/**
	 * @param id
	 *            订单ID
	 * @return
	 */
	public List<PurchaseOrderAll> findById(Long id);

	/**
	 * 卖家按上传状态查找订单
	 * 
	 * @param vendUU
	 *            卖方企业ID
	 * @param status
	 *            状态
	 * @return
	 */
	public List<PurchaseOrderAll> findByVendUUAndSendStatus(long vendUU, short sendStatus);

}
