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

@Repository
public interface SaleSendDao extends JpaSpecificationExecutor<SaleSend>, JpaRepository<SaleSend, Long> {

	/**
	 * 按卖出方企业ID和传输状态查找发货单
	 * 
	 * @param enUU
	 * @param backStatus
	 * @return
	 */
	List<SaleSend> findByEnUUAndBackStatus(long enUU, Short backStatus);

	/**
	 * 按买方企业ID和传输状态查找发货单
	 * 
	 * @param custUU
	 * @param sendStatus
	 * @return
	 */
	List<SaleSend> findByCustUUAndSendStatus(long custUU, Short sendStatus);

	/**
	 * 根究卖家UU号和发货单号获取发货单
	 * @param enUU
	 * @param code
	 * @return
	 */
	List<SaleSend> findByEnUUAndCode(Long enUU, String code);

}
