diff --git a/business/jxstore/cms/store_sku.go b/business/jxstore/cms/store_sku.go index ec6a0eb1d..02923b294 100644 --- a/business/jxstore/cms/store_sku.go +++ b/business/jxstore/cms/store_sku.go @@ -306,10 +306,6 @@ func GetStoresSkusForStore(ctx *jxcontext.Context, storeID int, isFocus, isAct b LEFT JOIN sku_name_place_bind f ON a.id = f.name_id AND e.city_code = f.place_code ` sqlParams = append(sqlParams, utils.DefaultTimeValue) - if categoryID != 0 { - sql += " AND d.id = ?" - sqlParams = append(sqlParams, categoryID) - } if isAct { sql += ` JOIN ( @@ -345,6 +341,10 @@ func GetStoresSkusForStore(ctx *jxcontext.Context, storeID int, isFocus, isAct b AND e.id = ? ` sqlParams = append(sqlParams, utils.DefaultTimeValue, utils.Bool2Int(isFocus), storeID) + if categoryID != 0 { + sql += " AND d.id = ?" + sqlParams = append(sqlParams, categoryID) + } if isFocus { sql += " AND ((a.status = ? AND b.status = ?) OR c.status = ?)" sqlParams = append(sqlParams, model.SkuStatusNormal, model.SkuStatusNormal, model.SkuStatusNormal)