diff --git a/business/model/dao/store_sku.go b/business/model/dao/store_sku.go index 06ed88e8c..97f67514b 100644 --- a/business/model/dao/store_sku.go +++ b/business/model/dao/store_sku.go @@ -132,7 +132,10 @@ func GetSkusCategories(db *DaoDB, vendorID, storeID int, skuIDs []int, level int func GetStoreCategories(db *DaoDB, vendorID, storeID int, level int) (cats []*StoreCatSyncInfo, err error) { fieldPrefix := ConvertDBFieldPrefix(model.VendorNames[vendorID]) sql := fmt.Sprintf(` - SELECT t5.*, t4.name cat_name, t4.seq, t4p.name parent_cat_name, t5p.category_id parent_cat_id, t5p.%s_id parent_vendor_cat_id, t5p.%s_sync_status parent_cat_sync_status + SELECT t5.*, + t4.name cat_name, t4.seq, + t4p.name parent_cat_name, + t5p.category_id parent_cat_id, t5p.%s_id parent_vendor_cat_id, t5p.%s_sync_status parent_cat_sync_status FROM store_sku_category_map t5 JOIN sku_category t4 ON t5.category_id = t4.id AND t4.deleted_at = ? LEFT JOIN sku_category t4p ON t4.parent_id = t4p.id