ny
昨天 b6f169fe43a2b13f351aefc152374fc7f0bc8cb7
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
package jnpf.permission.service;
 
import jnpf.base.model.portalManage.SavePortalAuthModel;
import jnpf.base.service.SuperService;
import jnpf.database.model.superQuery.SuperJsonModel;
import jnpf.permission.entity.AuthorizeEntity;
import jnpf.permission.model.authorize.AuthorizeDataUpForm;
import jnpf.permission.model.authorize.AuthorizeVO;
 
import java.util.List;
 
/**
 * 操作权限
 *
 * @author JNPF开发平台组
 * @version V3.1.0
 * @copyright 引迈信息技术有限公司
 * @date 2019年9月26日 上午9:18
 */
public interface AuthorizeService extends SuperService<AuthorizeEntity> {
 
    /**
     * 获取当前系统权限列表
     *
     * @param singletonOrg      是否启用
     * @param currentSystemCode 当前系统编码
     * @param isBackend         是否后台(当前用户信息用)
     * @return
     */
    AuthorizeVO getAuthorize(boolean singletonOrg, String currentSystemCode, Integer isBackend);
 
    /**
     * 全部系统权限
     *
     * @param singletonOrg
     * @return
     */
    AuthorizeVO getAuthorizeByUser(boolean singletonOrg);
 
    /**
     * 获取全部系统的权限
     *
     * @param singletonOrg      是否启用
     * @param currentSystemCode 当前系统编码
     * @param isBackend         是否后台(当前用户信息用)
     * @return
     */
    AuthorizeVO getAuthorize(boolean singletonOrg, String currentSystemCode, Integer isBackend, Boolean allSystem);
 
    /**
     * 创建
     *
     * @param authorizeList 实体对象
     */
    String save(AuthorizeDataUpForm authorizeList);
 
    /**
     * 根据用户id获取列表
     *
     * @param isAdmin        是否管理员
     * @param userId         用户主键
     * @param standingfilter 是否根据身份过滤(个人权限部分不需要过滤)
     * @return
     */
    List<AuthorizeEntity> getListByUserId(boolean isAdmin, String userId, boolean standingfilter);
 
    /**
     * 根据岗位或者角色获取全部权限
     *
     * @param objectId   岗位/角色id
     * @param objectType 类型:岗位-position/角色-role
     * @return
     */
    List<AuthorizeEntity> getListByPosOrRoleId(String objectId, String objectType);
 
    void saveItemAuth(SavePortalAuthModel portalAuthModel);
 
    List<SuperJsonModel> getConditionSql(String moduleId, String systemCode);
 
    void removeAuthByUserOrMenu(List<String> userIds, List<String> menuIds);
 
    void saveObjectAuth(SavePortalAuthModel portalAuthModel);
 
    /**
     * 通过Item获取权限列表
     *
     * @param itemType
     * @param itemId
     * @return
     */
    List<AuthorizeEntity> getAuthorizeByItem(String itemType, String itemId);
 
    List<AuthorizeEntity> getListByRoleIdsAndItemType(List<String> roleIds, String itemType);
 
    /**
     * 根据对象Id获取列表
     *
     * @param objectId 对象主键
     * @return
     */
    List<AuthorizeEntity> getListByObjectId(List<String> objectId);
 
    /**
     * 判断当前角色是否有权限
     *
     * @param roleId
     * @return
     */
    List<AuthorizeEntity> getListByRoleId(String roleId);
 
    /**
     * 根据对象Id获取列表
     *
     * @param objectId 对象主键
     * @param itemType 对象主键
     * @return
     */
    List<AuthorizeEntity> getListByObjectId(String objectId, String itemType);
 
    /**
     * 根据对象Id获取列表
     *
     * @param objectType 对象主键
     * @return
     */
    List<AuthorizeEntity> getListByObjectAndItem(String itemId, String objectType);
 
    /**
     * 根据对象Id获取列表
     *
     * @param itemId   对象主键
     * @param itemType 对象类型
     * @return
     */
    List<AuthorizeEntity> getListByObjectAndItemIdAndType(String itemId, String itemType);
 
}