package com.uas.finance.dao;

import com.uas.finance.model.FsSale;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Set;

/**
 * 基础合同信息表
 * created by shicr on 2018/1/25
 **/
@Repository
public interface FsSaleDao extends JpaRepository<FsSale,Long>{

    /**
     * 找到某出账单下的所有合同
     * @param aaid
     * @return
     */
    @Query(value = "select * from fasale where aa_id = ?1",nativeQuery = true)
    Set<FsSale> findByAa_id(Long aaid);
}
