fixed: 修复递归获取角色列表数据缺失问题 (#1974)

This commit is contained in:
Leslie 2024-12-31 11:38:04 +08:00 committed by GitHub
parent 1743c763d2
commit afe6b234cf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -224,7 +224,10 @@ func (authorityService *AuthorityService) GetStructAuthorityList(authorityID uin
if len(authorities) > 0 { if len(authorities) > 0 {
for k := range authorities { for k := range authorities {
list = append(list, authorities[k].AuthorityId) list = append(list, authorities[k].AuthorityId)
_, err = authorityService.GetStructAuthorityList(authorities[k].AuthorityId) childrenList, err := authorityService.GetStructAuthorityList(authorities[k].AuthorityId)
if err == nil {
list = append(list, childrenList...)
}
} }
} }
if *auth.ParentId == 0 { if *auth.ParentId == 0 {