add: multi-tenant
This commit is contained in:
1 parent
6ce288c3ef
commit
82420a8445
14 files changed
+1253
-9
No files matched your search
@@ -49,3 +49,21 @@ func SysDeptTreeSelect(sysDept systemModel.SysDept) TreeSelect {
|
||||
|
||||
return t
|
||||
}
|
||||
|
||||
// SysDeptTreeSelect 使用给定的 SysDept 对象解析为 TreeSelect 对象
|
||||
func SysTenantTreeSelect(sysTenant systemModel.SysTenant) TreeSelect {
|
||||
t := TreeSelect{}
|
||||
t.ID = sysTenant.TenantID
|
||||
t.Label = sysTenant.TenantName
|
||||
|
||||
if len(sysTenant.Children) > 0 {
|
||||
for _, tenant := range sysTenant.Children {
|
||||
child := SysTenantTreeSelect(tenant)
|
||||
t.Children = append(t.Children, child)
|
||||
}
|
||||
} else {
|
||||
t.Children = []TreeSelect{}
|
||||
}
|
||||
|
||||
return t
|
||||
}
|
||||
Reference in new issue
Block a user