package com.cftech.sys.service;

import com.cftech.sys.model.Permission;

import java.util.List;
import java.util.Map;

/**
 * 权限 业务接口
 * 
 **/
public interface PermissionService{

    /**
     * 通过角色id 查询角色 拥有的权限
     * 
     * @param roleId
     * @return
     */
	
    List<Permission> selectPermissionsByRoleId(Long roleId);
    
    List<Permission> getMenuTree();
    
    List<Permission> getMenuTreeExcludeCurrent();
    int updateLevelByPrimaryKey(Map permission);
    
    long insertPermission(Permission permission);
    
    int updatePermissions(Permission permission);
    
    List<Permission> getMenuByRoles(String roleIds);
    List<Permission> getPermissionsByRoles(String roleIds);

    List<Permission> getAllPermission();
    
    int deleteByPrimaryKey(Long id);
    Permission selectByPrimaryKey(Long id);
}
