From 155ab11d9f1be335909aaec65d6dfb2be3da606a Mon Sep 17 00:00:00 2001 From: BXY <103352887+BXY0414@users.noreply.github.com> Date: Thu, 8 Oct 2026 18:21:12 +0800 Subject: [PATCH] fix: update productCategoryColumns to include table alias for clarity --- internal/repository/product_category_repository.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/repository/product_category_repository.go b/internal/repository/product_category_repository.go index 763e961..6d7ccda 100644 --- a/internal/repository/product_category_repository.go +++ b/internal/repository/product_category_repository.go @@ -149,7 +149,7 @@ func (r *ProductRepository) GetProductCategory(ctx context.Context, id string) ( return r.loadProductCategoryTree(ctx, id) } -const productCategoryColumns = `id,parent_id,level,name,priority,rule_id,status,category_type,channel_list,has_children,has_prop_required,extra,cert_status_code,cert_status_pass,cert_status_msg,version,created_at,updated_at,deleted_at,(SELECT COUNT(*) FROM product.product_category_bindings b WHERE b.product_category_id=c.id AND b.deleted_at IS NULL)` +const productCategoryColumns = `c.id,c.parent_id,c.level,c.name,c.priority,c.rule_id,c.status,c.category_type,c.channel_list,c.has_children,c.has_prop_required,c.extra,c.cert_status_code,c.cert_status_pass,c.cert_status_msg,c.version,c.created_at,c.updated_at,c.deleted_at,(SELECT COUNT(*) FROM product.product_category_bindings b WHERE b.product_category_id=c.id AND b.deleted_at IS NULL)` func (r *ProductRepository) loadProductCategoryTree(ctx context.Context, id string) (*ProductCategoryRecord, error) { parsed, err := parseID(id, "product_category_id")