package com.yn.bftl.thirdparty.common.repository;

import com.yn.bftl.common.modules.company.entity.Company;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface CompanyRepository extends JpaRepository<Company, Long> {

//    Company findFirstByBizUserId(String bizUserId);

    /**
     * 企业-根据环信ID查询
     *
     * @param easemobId:环信ID
     * @return 企业
     * @author huabiao
     * @create 2022/8/23  10:17
     */
//    Company findByEasemobId(String easemobId);

    /**
     * 企业-根据电子账户ID查询
     *
     * @param walletId:电子钱包ID
     * @return true:存在、false:未存在
     * @author huabiao
     * @create 2022/9/14  13:56
     */
    Boolean existsByWalletId(String walletId);

    /**
     * 根据电子账簿id查询
     *
     * @param walletId
     * @return
     */
    Company findByWalletId(String walletId);

    Company findByRegisterNo(String registerNo);
}
