package com.uas.platform.b2b.history.dao;

import java.util.List;

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

import com.uas.platform.b2b.history.model.SaleSendItem;

@Repository("history.SaleSendItemDao")
public interface SaleSendItemDao extends JpaSpecificationExecutor<SaleSendItem>, JpaRepository<SaleSendItem, Long> {

	/**
	 * 按送货提醒单ID查找发货单明细
	 * 
	 * @param noticeId
	 * @return
	 */
	@Query("from SaleSendItem s where s.notice.id = :noticeId order by s.id")
	List<SaleSendItem> findByNoticeId(@Param("noticeId") long noticeId);

}
