package cn.quantgroup.xyqb.repository;

import cn.quantgroup.xyqb.entity.ProductLoginEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;


/**
 * Li Jianhua
 */
@Repository
public interface IProductLoginRepository extends JpaRepository<ProductLoginEntity, Long> {


    ProductLoginEntity findFirstByInstitutionIdAndProductIdAndPhoneNo(String institutionId, String productId, String phoneNo);

    ProductLoginEntity findFirstByPhoneNo(String phoneNo);

    ProductLoginEntity findByInstitutionIdAndProductIdAndExtensionAccountId(String institutionId, String productId, Long userId);

    List<ProductLoginEntity> findAllByExtensionAccountId(Long userId);
}