zhuguifei
2026-03-10 2c1fd10c6fbabb8e9f0e9f07fe66fb36c008e883
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
package com.shlanbao.tzsc.pms.sys.role.service;
 
import java.util.List;
 
import com.shlanbao.tzsc.pms.sys.resource.beans.ResourceBean;
import com.shlanbao.tzsc.pms.sys.role.beans.RoleBean;
import com.shlanbao.tzsc.pms.sys.user.beans.UserBean;
/**
 * 角色
 * <li>@author Leejean
 * <li>@create 2014-8-18下午10:59:40
 */
public interface RoleServiceI {
    /**
     * 获得所有角色
     * @author Leejean
     * @create 2014-8-18下午10:59:21
     * @return
     * @throws Exception
     */
    public List<RoleBean> getAllRoles(RoleBean roleBean) throws Exception;    
    /**
     * 新增角色
     * @author Leejean
     * @create 2014-8-21上午08:44:45
     * @param roleBean
     * @return
     */
    public void addRole(RoleBean roleBean) throws Exception;
    /**
     * 编辑角色
     * @author Leejean
     * @create 2014-8-21上午08:44:45
     * @param roleBean
     * @return
     */
    public void editRole(RoleBean roleBean) throws Exception;
    /**
     * 删除角色
     * @author Leejean
     * @create 2014-8-21上午08:44:45
     * @param roleBean
     * @return
     */
    public void deleteRole(String id) throws Exception;
    /**
     * 批量删除角色
     * @author Leejean
     * @create 2014-8-21上午08:44:45
     * @param ids ids串
     * @return
     */
    public void batchDeleteRoles(String ids) throws Exception;
    /**
     * 给角色分配权限
     * @author Leejean
     * @create 2014-8-21上午09:04:05
     * @param id 角色id
     * @param ids 资源id串
     * @return
     */
    public void assignResourceToRole(String id, String ids) throws Exception;
    /**
     * 批量给角色分配权限
     * @author Leejean
     * @create 2014-8-21上午09:04:05
     * @param id 角色id串
     * @param rids 资源id串
     * @return
     */
    public void batchAssignResourceToRoles(String rids, String resids) throws Exception;
    /**
     * 根据角色id得到角色
     * @author Leejean
     * @create 2014-8-21上午10:34:22
     * @param id 角色id
     * @return
     */
    public RoleBean getSysRoleById(String id) throws Exception;
    /**
     * 根据角色获得该角色拥有的资源
     * @author Leejean
     * @create 2014年8月25日下午9:25:17
     * @param id 角色id
     * @return 资源列表
     */
    public List<ResourceBean> getResourcesByRole(String id) throws Exception;
    /**
     * 给角色分配用户
     * @author Leejean
     * @create 2014年8月29日上午11:38:43
     * @param id 角色id
     * @param ids 用户ids
     * @return
     */
    public void assignUsersToRole(String id, String ids) throws Exception;
    /**
     * 查询待分配的角色用户
     * @author Leejean
     * @create 2014年8月25日下午9:41:58
     * @param id 角色id
     * @return
     */
    public List<UserBean> getRoleUnAssignedUsers(String oid, String name) throws Exception;
    /**
     * 查询已分配的角色用户
     * @author Leejean
     * @create 2014年8月25日下午9:41:58
     * @param id 角色id
     * @return
     */
    public List<UserBean> getRoleAssignedUsers(String oid) throws Exception;
    //////////
    /**
     * 获得用户角色
     * @author Leejean
     * @create 2014-8-19上午09:34:00
     * @param id 用户id
     * @return
     */
    List<RoleBean> getRolesByUser(String id) throws Exception;
    /**
     * 给用户分配角色
     * @author Leejean
     * @create 2014-8-19下午03:40:28
     * @param id 用户id
     * @param ids 角色id
     */
    void assignRole(String id, String ids) throws Exception;
    /**
     * 用户角色批量分配
     * @author Leejean
     * @create 2014-8-19下午07:22:22
     * @param uids 用户ids
     * @param rids 角色ids
     * @return
     */
    void batchAssignRole(String uids, String rids) throws Exception;
}