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

@Repository
public interface InvitationRecordDao
		extends JpaRepository<InvitationRecord, Long>, JpaSpecificationExecutor<InvitationRecord> {

	/**
	 * 邀请人和客户企业名称记录邀请次数
	 * 
	 * @param useruu
	 * @param vendname
	 * @return
	 */
	public InvitationRecord findByUseruuAndVendname(Long useruu, String vendname);

	/**
	 * 通过邀请企业uu号和供应商名称查询邀请记录
	 *
	 * @param enuu
	 * @param vendname
	 * @return
	 */
	public InvitationRecord findByEnuuAndVendname(Long enuu, String vendname);

	/**
	 * 通过注册UU号查询邀请记录
	 *
	 * @param enuu uu号
	 * @return
	 */
    List<InvitationRecord> findByVenduu(Long enuu);
}
