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

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


/**
 * UserRepository
 *
 * @author chendehuihuo
 * @date 2021/11/19  14:38
 **/
@Repository
public interface UserRepository extends JpaRepository<User, Long> {

    User findFirstByPhone(String phone);

    /**
     * 用户-根据用户名查询
     *
     * @param name:用户名
     * @return
     * @description 用户
     * @author huabiao
     * @create 2022/8/23  10:00
     */
    User findFirstByNameAndIsCustomerServiceTrue(String name);

}
