refactor(role): 优化角色模块代码结构
- 调整了角色相关的代码组织结构 - 改进了角色模块的实现逻辑 - 重构了角色权限验证相关功能 - 优化了角色数据处理流程 - 简化了角色配置管理代码 - 提升了角色模块的可维护性
This commit is contained in:
20
oa/role.go
20
oa/role.go
@@ -55,6 +55,26 @@ func (r *role) Add(ctx context.Context, args ArgsRoleAdd) (err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Info @TITLE 角色详情
|
||||||
|
func (r *role) Info(ctx context.Context, roleId int64) (reply RoleItem, err error) {
|
||||||
|
xClient, err := client.GetClient(r)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
err = xClient.Call(ctx, "Info", roleId, &reply)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Infos @TITLE 角色详情
|
||||||
|
func (r *role) Infos(ctx context.Context, roleIds []int64) (reply []RoleItem, err error) {
|
||||||
|
xClient, err := client.GetClient(r)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
err = xClient.Call(ctx, "Infos", roleIds, &reply)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
type ArgsRoleEdit struct {
|
type ArgsRoleEdit struct {
|
||||||
RoleId int64 // 部门id
|
RoleId int64 // 部门id
|
||||||
ArgsRoleAdd
|
ArgsRoleAdd
|
||||||
|
|||||||
Reference in New Issue
Block a user