From 2e567bb2f4a10bd0d0bbbf911bfabd47df07aa33 Mon Sep 17 00:00:00 2001 From: suyl <770236076@qq.com> Date: Mon, 31 May 2021 10:32:42 +0800 Subject: [PATCH] aa --- business/jxstore/cms/store.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/business/jxstore/cms/store.go b/business/jxstore/cms/store.go index 9930e5795..d975abed6 100644 --- a/business/jxstore/cms/store.go +++ b/business/jxstore/cms/store.go @@ -4669,12 +4669,7 @@ func QueryPageSkus(ctx *jxcontext.Context, vendorID int, vendorStoreIDs []string } } sql += ` )t1 - LEFT JOIN place t2 ON t2.name = t1.city_name ` - if cityCode > 0 { - sql += " AND t2.code = ?" - sqlParams = append(sqlParams, cityCode) - } - sql += ` + LEFT JOIN place t2 ON t2.name = t1.city_name WHERE 1 = 1 ` if keyword != "" { @@ -4686,6 +4681,11 @@ func QueryPageSkus(ctx *jxcontext.Context, vendorID int, vendorStoreIDs []string sql += " AND t1.store_id IN (" + dao.GenQuestionMarks(len(vendorStoreIDs)) + ")" sqlParams = append(sqlParams, vendorStoreIDs) } + if cityCode > 0 { + sql += " AND t2.code = ?" + sqlParams = append(sqlParams, cityCode) + } + //if radius > 0 { // sql += " AND ROUND(t1.distance * 1000) < ?" // sqlParams = append(sqlParams, radius)