接口 UserDao

所有超级接口:
org.springframework.data.repository.CrudRepository<User,Long>, HiverBaseDao<User,Long>, org.springframework.data.jpa.repository.JpaRepository<User,Long>, org.springframework.data.jpa.repository.JpaSpecificationExecutor<User>, org.springframework.data.repository.ListCrudRepository<User,Long>, org.springframework.data.repository.ListPagingAndSortingRepository<User,Long>, org.springframework.data.repository.PagingAndSortingRepository<User,Long>, org.springframework.data.repository.query.QueryByExampleExecutor<User>, org.springframework.data.repository.Repository<User,Long>

@Repository public interface UserDao extends HiverBaseDao<User,Long>
用户数据处理层

尊重知识产权,CV 请保留版权,海文科技 https://hiver.cc 出品,不允许非法使用,后果自负

作者:
Yazhi Li
  • 嵌套类概要

    从接口继承的嵌套类/接口 org.springframework.data.jpa.repository.JpaSpecificationExecutor

    org.springframework.data.jpa.repository.JpaSpecificationExecutor.SpecificationFluentQuery<T extends Object>
  • 方法概要

    修饰符和类型
    方法
    说明
    findByDeletedAndStatusAndDepartmentId(Integer deleted, Integer status, Long departmentId)
    通过部门获得员工列表
    findByDepartmentId(Long departmentId)
    通过部门id获取
    通过邮件获取用户
    通过手机获取用户
    通过用户名获取用户
    通过用户名模糊搜索
    搜索用户
    void
    updateDepartmentTitle(Long departmentId, String departmentTitle)
    更新部门名称

    从接口继承的方法 org.springframework.data.repository.CrudRepository

    count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save

    从接口继承的方法 org.springframework.data.jpa.repository.JpaRepository

    deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlush

    从接口继承的方法 org.springframework.data.jpa.repository.JpaSpecificationExecutor

    count, delete, exists, findAll, findAll, findAll, findAll, findBy, findOne

    从接口继承的方法 org.springframework.data.repository.ListCrudRepository

    findAll, findAllById, saveAll

    从接口继承的方法 org.springframework.data.repository.ListPagingAndSortingRepository

    findAll

    从接口继承的方法 org.springframework.data.repository.PagingAndSortingRepository

    findAll

    从接口继承的方法 org.springframework.data.repository.query.QueryByExampleExecutor

    count, exists, findAll, findBy, findOne
  • 方法详细资料

    • findByUsername

      User findByUsername(String username)
      通过用户名获取用户
    • findByMobile

      User findByMobile(String mobile)
      通过手机获取用户
    • findByEmail

      User findByEmail(String email)
      通过邮件获取用户
    • findByDepartmentId

      List<User> findByDepartmentId(Long departmentId)
      通过部门id获取
    • findByUsernameLikeAndStatus

      @Query("select u from User u where u.username like %?1% or u.nickname like %?1% and u.status = ?2") List<User> findByUsernameLikeAndStatus(String key, Integer status)
      通过用户名模糊搜索
    • updateDepartmentTitle

      @Modifying @Query("update User u set u.departmentTitle=?2 where u.departmentId=?1") void updateDepartmentTitle(Long departmentId, String departmentTitle)
      更新部门名称
    • findByDeletedAndStatusAndDepartmentId

      List<User> findByDeletedAndStatusAndDepartmentId(Integer deleted, Integer status, Long departmentId)
      通过部门获得员工列表
    • findByUsernameOrEmailOrMobile

      User findByUsernameOrEmailOrMobile(String username, String email, String mobile)
      搜索用户
      参数:
      username -
      email -
      mobile -
      返回: