package com.uas.platform.b2b.dao;

import com.uas.platform.b2b.model.PurchaseTenderQuestion;
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 java.util.List;

/**
 * 招标单提问单
 * 2017-09-11 10:07
 */
@Repository
public interface PurchaseTenderQuestionDao extends JpaSpecificationExecutor<PurchaseTenderQuestion>, JpaRepository<PurchaseTenderQuestion, Long> {


	/**
	 * 根据当前企业uu获取问题列表
	 * @param uu
	 * @return
	 */
	@Query("from PurchaseTenderQuestion q where q.purchaseTenderAnswer.enUU = :uu")
	List<PurchaseTenderQuestion> findByVendUU(@Param("uu") Long uu);
}
