Skip to content

Commit afe6b23

Browse files
authored
fixed: 修复递归获取角色列表数据缺失问题 (#1974)
1 parent 1743c76 commit afe6b23

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

server/service/system/sys_authority.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,10 @@ func (authorityService *AuthorityService) GetStructAuthorityList(authorityID uin
224224
if len(authorities) > 0 {
225225
for k := range authorities {
226226
list = append(list, authorities[k].AuthorityId)
227-
_, err = authorityService.GetStructAuthorityList(authorities[k].AuthorityId)
227+
childrenList, err := authorityService.GetStructAuthorityList(authorities[k].AuthorityId)
228+
if err == nil {
229+
list = append(list, childrenList...)
230+
}
228231
}
229232
}
230233
if *auth.ParentId == 0 {

0 commit comments

Comments
 (0)