From 51d70c03d1e82249127644fbbaaa6e0303a382b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Thu, 25 Mar 2021 17:50:24 +0800 Subject: [PATCH] aa --- business/jxstore/cms/store_sku.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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)