package cn.reghao.oss.console.account.db.query;

import cn.reghao.oss.console.account.model.po.Role;
import cn.reghao.oss.console.account.model.po.User;
import cn.reghao.oss.console.account.model.vo.UserVO;
import cn.reghao.jutil.jdk.db.BaseQuery;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;

import java.util.*;

/**
 * @author reghao
 * @date 2021-07-12 15:32:26
 */
public interface UserQuery extends BaseQuery<User> {
    Page<UserVO> getUserVOByPage(PageRequest pageRequest);
    List<UserVO> getByMatchScreenName(String screenName);
    /**
     * 获取用户拥有的角色
     *
     * @param
     * @return
     * @date 2021-09-10 下午11:12
     */
    Set<Role> getUserRoles(User user);
    Set<Role> getUserRoles(Integer userId);
}
