f
This commit is contained in:
@@ -205,7 +205,7 @@ func (r *GormProductRepository) ListProducts(ctx context.Context, query *queries
|
||||
}
|
||||
|
||||
// 预加载分类信息并获取数据
|
||||
if err := dbQuery.Preload("Category").Find(&productEntities).Error; err != nil {
|
||||
if err := dbQuery.Preload("Category").Preload("SubCategory").Find(&productEntities).Error; err != nil {
|
||||
return nil, 0, err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user