-
Notifications
You must be signed in to change notification settings - Fork 263
/
rbac_dao.go
executable file
·149 lines (139 loc) · 5.72 KB
/
rbac_dao.go
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
140
141
142
143
144
145
146
147
148
149
package dao
import (
"github.com/ixre/go2o/core/dao/model"
)
type IRbacDao interface {
// auto generate by gof
// Get 部门
GetPermDept(primary interface{}) *model.PermDept
// GetBy 部门
GetPermDeptBy(where string, v ...interface{}) *model.PermDept
// Count 部门 by condition
CountPermDept(where string, v ...interface{}) (int, error)
// Select 部门
SelectPermDept(where string, v ...interface{}) []*model.PermDept
// Save 部门
SavePermDept(v *model.PermDept) (int, error)
// Delete 部门
DeletePermDept(primary interface{}) error
// Batch Delete 部门
BatchDeletePermDept(where string, v ...interface{}) (int64, error)
// Get 岗位
GetPermJob(primary interface{}) *model.PermJob
// GetBy 岗位
GetPermJobBy(where string, v ...interface{}) *model.PermJob
// Count 岗位 by condition
CountPermJob(where string, v ...interface{}) (int, error)
// Select 岗位
SelectPermJob(where string, v ...interface{}) []*model.PermJob
// Save 岗位
SavePermJob(v *model.PermJob) (int, error)
// Delete 岗位
DeletePermJob(primary interface{}) error
// Batch Delete 岗位
BatchDeletePermJob(where string, v ...interface{}) (int64, error)
// Params paging data
PagingQueryPermJob(begin, end int, where, orderBy string) (total int, rows []map[string]interface{})
// Get 系统用户
GetPermUser(primary interface{}) *model.PermUser
// GetBy 系统用户
GetPermUserBy(where string, v ...interface{}) *model.PermUser
// Count 系统用户 by condition
CountPermUser(where string, v ...interface{}) (int, error)
// Select 系统用户
SelectPermUser(where string, v ...interface{}) []*model.PermUser
// Save 系统用户
SavePermUser(v *model.PermUser) (int, error)
// Delete 系统用户
DeletePermUser(primary interface{}) error
// Batch Delete 系统用户
BatchDeletePermUser(where string, v ...interface{}) (int64, error)
// Params paging data
PagingQueryPermUser(begin, end int, where, orderBy string) (total int, rows []map[string]interface{})
// Get 角色
GetPermRole(primary interface{}) *model.PermRole
// GetBy 角色
GetPermRoleBy(where string, v ...interface{}) *model.PermRole
// Count 角色 by condition
CountPermRole(where string, v ...interface{}) (int, error)
// Select 角色
SelectPermRole(where string, v ...interface{}) []*model.PermRole
// Save 角色
SavePermRole(v *model.PermRole) (int, error)
// Delete 角色
DeletePermRole(primary interface{}) error
// Batch Delete 角色
BatchDeletePermRole(where string, v ...interface{}) (int64, error)
// Params paging data
PagingQueryPermRole(begin, end int, where, orderBy string) (total int, rows []map[string]interface{})
// Get PermRes
GetPermRes(primary interface{}) *model.PermRes
// GetBy PermRes
GetPermResBy(where string, v ...interface{}) *model.PermRes
// Count PermRes by condition
CountPermRes(where string, v ...interface{}) (int, error)
// Select PermRes
SelectPermRes(where string, v ...interface{}) []*model.PermRes
// 获取最大的排列序号
GetMaxResourceSortNum(parentId int) int
// Save PermRes
SavePermRes(v *model.PermRes) (int, error)
// Delete PermRes
DeletePermRes(primary interface{}) error
// Batch Delete PermRes
BatchDeletePermRes(where string, v ...interface{}) (int64, error)
// Get 用户角色关联
GetPermUserRole(primary interface{}) *model.PermUserRole
// GetBy 用户角色关联
GetPermUserRoleBy(where string, v ...interface{}) *model.PermUserRole
// Count 用户角色关联 by condition
CountPermUserRole(where string, v ...interface{}) (int, error)
// Select 用户角色关联
SelectPermUserRole(where string, v ...interface{}) []*model.PermUserRole
// Save 用户角色关联
SavePermUserRole(v *model.PermUserRole) (int, error)
// Delete 用户角色关联
DeletePermUserRole(primary interface{}) error
// Batch Delete 用户角色关联
BatchDeletePermUserRole(where string, v ...interface{}) (int64, error)
// Params paging data
PagingQueryPermUserRole(begin, end int, where, orderBy string) (total int, rows []map[string]interface{})
// Get 角色部门关联
GetPermRoleDept(primary interface{}) *model.PermRoleDept
// GetBy 角色部门关联
GetPermRoleDeptBy(where string, v ...interface{}) *model.PermRoleDept
// Count 角色部门关联 by condition
CountPermRoleDept(where string, v ...interface{}) (int, error)
// Select 角色部门关联
SelectPermRoleDept(where string, v ...interface{}) []*model.PermRoleDept
// Save 角色部门关联
SavePermRoleDept(v *model.PermRoleDept) (int, error)
// Delete 角色部门关联
DeletePermRoleDept(primary interface{}) error
// Batch Delete 角色部门关联
BatchDeletePermRoleDept(where string, v ...interface{}) (int64, error)
// Params paging data
PagingQueryPermRoleDept(begin, end int, where, orderBy string) (total int, rows []map[string]interface{})
// Get 角色菜单关联
GetPermRoleRes(primary interface{}) *model.PermRoleRes
// GetBy 角色菜单关联
GetPermRoleResBy(where string, v ...interface{}) *model.PermRoleRes
// Count 角色菜单关联 by condition
CountPermRoleRes(where string, v ...interface{}) (int, error)
// Select 角色菜单关联
SelectPermRoleRes(where string, v ...interface{}) []*model.PermRoleRes
// Save 角色菜单关联
SavePermRoleRes(v *model.PermRoleRes) (int, error)
// Delete 角色菜单关联
DeletePermRoleRes(primary interface{}) error
// Batch Delete 角色菜单关联
BatchDeletePermRoleRes(where string, v ...interface{}) (int64, error)
// Params paging data
PagingQueryPermRoleRes(begin, end int, where, orderBy string) (total int, rows []map[string]interface{})
// 获取角色关联的资源列表
GetRoleResList(roleId int64) []int64
// 获取用户的角色
GetUserRoles(id int64) []*model.PermUserRole
// 获取角色关联系
GetRoleResources(roles []int) []*model.PermRes
}