From e430c8ae5901192a5049bf23f7fb331c9a506b53 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, 9 Jan 2020 17:53:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E9=94=99=E8=AF=AF=E8=BF=94?= =?UTF-8?q?=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/model/dao/store_sku.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/business/model/dao/store_sku.go b/business/model/dao/store_sku.go index 6b05ec369..fcbcabbdd 100644 --- a/business/model/dao/store_sku.go +++ b/business/model/dao/store_sku.go @@ -299,10 +299,9 @@ func GetStoreCategories(db *DaoDB, vendorID, storeID int, skuIDs []int, level in SELECT DISTINCT b.category_id FROM sku a JOIN sku_name b ON a.name_id = b.id AND b.deleted_at = ? - WHERE 1=1 - AND a.id IN (` + GenQuestionMarks(len(skuIDs)) + `) + WHERE a.id IN (` + GenQuestionMarks(len(skuIDs)) + `) AND a.deleted_at = ? - )t6 ON t6.category_id = t4.id + ) t6 ON t6.category_id = t4.id ` sqlParams = append(sqlParams, utils.DefaultTimeValue, skuIDs, utils.DefaultTimeValue) }