You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.0 KiB
39 lines
1.0 KiB
package com.eco.plugin.xx.zgydsso.utils; |
|
|
|
import com.fr.decision.authority.data.CustomRole; |
|
import com.fr.decision.webservice.v10.user.CustomRoleService; |
|
import com.fr.decision.webservice.v10.user.controller.SuperCustomRoleController; |
|
|
|
import java.util.List; |
|
|
|
public class FRRoleUtils { |
|
|
|
/** |
|
* 获取角色service |
|
* @return |
|
*/ |
|
private static CustomRoleService getRoleService(){ |
|
return CustomRoleService.getInstance(); |
|
} |
|
|
|
/** |
|
* 获取全部角色 |
|
* @return |
|
* @throws Exception |
|
*/ |
|
public static CustomRole[] getAllRole() throws Exception { |
|
// List<RoleBean> roleBean = UserMiddleRoleService.getInstance().getAllCustomRoles(); |
|
CustomRole[] roles = SuperCustomRoleController.KEY.getAllCustomRoles((String)null, ""); |
|
return roles; |
|
} |
|
|
|
/** |
|
* 根据角色id获取角色列表 |
|
* @return |
|
* @throws Exception |
|
*/ |
|
public static List<CustomRole> getRoleByUser(String userid) throws Exception { |
|
|
|
return getRoleService().getCustomRolesByUser(userid); |
|
} |
|
}
|
|
|