package com.uas.platform.b2b.dao;

import com.uas.platform.b2b.model.SaleOrderItem;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 只保存明细
 * Created by hejq on 2018-06-19.
 */
@Repository
public interface SaleOrderItemDao extends JpaSpecificationExecutor<SaleOrderItem>, JpaRepository<SaleOrderItem, Long> {

    /**
     * 通过主表id和明细序号查询单据是否存在
     *
     * @param puId 主表id
     * @param number 明细序号
     * @return
     */
    List<SaleOrderItem> findByPuIdAndNumber(Long puId, Short number);
}
