diff --git a/internal/infrastructure/database/repositories/product/gorm_subscription_repository.go b/internal/infrastructure/database/repositories/product/gorm_subscription_repository.go index 6bb18d6..d4bc834 100644 --- a/internal/infrastructure/database/repositories/product/gorm_subscription_repository.go +++ b/internal/infrastructure/database/repositories/product/gorm_subscription_repository.go @@ -172,10 +172,10 @@ func (r *GormSubscriptionRepository) ListSubscriptions(ctx context.Context, quer dbQuery = dbQuery.Offset(offset).Limit(query.PageSize) } - // 预加载Product的id、name、code字段,并同时预加载ProductCategory的id、name、code字段 + // 预加载Product的id、name、code、price、is_package字段,并同时预加载ProductCategory的id、name、code字段 if err := dbQuery. Preload("Product", func(db *gorm.DB) *gorm.DB { - return db.Select("id", "name", "code", "category_id"). + return db.Select("id", "name", "code", "price", "is_package", "category_id"). Preload("Category", func(db2 *gorm.DB) *gorm.DB { return db2.Select("id", "name", "code") })