package com.goafanti.permission.service;



import java.util.List;
import java.util.Set;


import com.goafanti.common.model.Role;
import com.goafanti.common.model.RoleResources;
import com.goafanti.core.mybatis.page.Pagination;
import com.goafanti.permission.bo.RoleBo;
import com.goafanti.permission.bo.RolePermissionBo;

public interface NewRoleService {
	Pagination<RoleBo>findRoles(RoleBo role, Integer pageNo,
			Integer pageSize);
	
	int insert(List<Role> records);

	// 根据用户ID查询角色（role），放入到Authorization里。
	Set<String> findRoleByUserId(String userId);

	int deleteByPrimaryKeys(List<String> records);

	int bindPermission(String roleId, String permissionId);

	int unbindPermission(String roleId, String permissionId);

	int bindUser(String roleId, String userId);

	int unbindUser(String roleId, String userId);

	int insert(Role record, List<String> permissions);
	
	List<RolePermissionBo> selectRolePList(String id);
	
	int addResources(String rid, String resources);

	int updatedimission(String aid, String transferId);

	List<RoleResources> ResourcesDetail(String rid);
}
