优化结构
This commit is contained in:
@@ -281,12 +281,6 @@ func (r *menuRepo) SetAuthorityMenus(ctx context.Context, id uint, ids []uint) e
|
||||
})
|
||||
}
|
||||
|
||||
func (r *menuRepo) AuthorityMenuIDs(ctx context.Context, id uint) ([]uint, error) {
|
||||
var ids []uint
|
||||
err := r.data.DB().WithContext(ctx).Model(&authorityMenuPO{}).Where("sys_authority_authority_id = ?", id).Pluck("sys_base_menu_id", &ids).Error
|
||||
return ids, err
|
||||
}
|
||||
|
||||
// ListAuthorityMenus reads the authority-menu query. It reads the
|
||||
// target authority's relation rows first and then fetches only those base
|
||||
// menus. In particular, it deliberately does not call List: List applies the
|
||||
|
||||
Reference in New Issue
Block a user