- fix bug in dao.GetStoreCategories(forget t5p.store_id)

This commit is contained in:
gazebo
2018-12-04 19:40:45 +08:00
parent ef0df585ce
commit e67920f4cf

View File

@@ -79,7 +79,7 @@ func GetStoreCategories(db *DaoDB, vendorID, storeID int, level int) (cats []*St
FROM store_sku_category_map t5
JOIN sku_category t4 ON t5.category_id = t4.id
LEFT JOIN sku_category t4p ON t4.parent_id = t4p.id
LEFT JOIN store_sku_category_map t5p ON t4p.id = t5p.category_id AND t5p.deleted_at = ?
LEFT JOIN store_sku_category_map t5p ON t4p.id = t5p.category_id AND t5.store_id = t5p.store_id AND t5p.deleted_at = ?
WHERE t5.store_id = ? AND t4.level = ? AND t5.%s_sync_status <> 0
`, fieldPrefix, fieldPrefix, fieldPrefix)
if err = GetRows(db, &cats, sql, utils.DefaultTimeValue, storeID, level); err != nil {