package cn.reghao.devops.mgr.admin.db.repository;

import cn.reghao.devops.mgr.admin.model.po.User;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

/**
 * @author reghao
 * @date 2019-08-29 10:52:14
 */
public interface UserRepository extends JpaRepository<User, Integer>, JpaSpecificationExecutor<User> {
    User findByUsername(String username);
    int countByRole_id(int id);
    Page<User> findAllByRole_id(int id, Pageable pageable);
}
