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

This commit is contained in:
LeslieLin 2024-12-31 00:03:00 +08:00
parent 21237f8be1
commit a1646bba63
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 {
for k := range authorities {
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 {