package com.lightinit.hsdataplatformresdir.service;

import com.lightinit.hsdataplatformresdir.entity.AdminRole;
import com.lightinit.hsdataplatformresdir.entity.RoleModule;
import com.lightinit.hsdataplatformresdir.entity.SentryRole;

import java.util.Dictionary;
import java.util.List;

/**
 * Created by Mr.Yao on 2017/4/24.
 */
public interface IRoleService {
    List<SentryRole> QueryList(int page, int rows, Dictionary<String,String> conditions);
    long QueryCount(Dictionary<String,String> conditions);
    SentryRole QueryOne(long id);
    boolean InsertRole(SentryRole role);
    boolean DeleteRole(long id);
    boolean UpdateRole(SentryRole role);
    List<RoleModule> QueryModuleList(long roleid);
    List<AdminRole> QueryRoleList(long uid);
    List<SentryRole> QueryRoleList(String username);
    boolean SaveRoleModule(long roleid,List<Long> moduleIds, List<Long> actionIds);
    boolean IsExitsRole(String code);
    boolean CheckRoleHasUser(List<Long> ids);
    boolean CheckRoleHasModules(List<Long> ids);
    boolean SaveUserRoles(long uid,List<Long> ids);
    boolean CheckUserHasRole(Long id);
    List<SentryRole> QueryManyRole(List<Long> list);
    List<RoleModule> QueryModuleList(List<Long> roleids);
    List<RoleModule> QueryUserModuleList(String username);
}
