package cn.quant.baa.pay.jpa.repository;

import cn.quant.baa.pay.jpa.entity.CustomerEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

/**
 * Created by Administrator on 2021/8/22 0022.
 */
@Repository
public interface CustomerRepository extends JpaRepository<CustomerEntity, Long> {

    @Query(value = "select  cust from CustomerEntity cust where cust.institutionId=:institutionId and cust.customerRefNo=:customerRefNo")
    CustomerEntity findOne(@Param("institutionId") String institutionId, @Param("customerRefNo") String customerRefNo);
}
