From f2bc43f18b4530ccad5a7b27452fa7cd78370d71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Fri, 24 Jul 2020 15:13:36 +0800 Subject: [PATCH] =?UTF-8?q?getstores=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/store.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/business/jxstore/cms/store.go b/business/jxstore/cms/store.go index bfcbd87b6..c01c4157b 100644 --- a/business/jxstore/cms/store.go +++ b/business/jxstore/cms/store.go @@ -384,8 +384,10 @@ func getStoresSql(ctx *jxcontext.Context, keyword string, params map[string]inte if err = utils.UnmarshalUseNumber([]byte(params["marketManPhones"].(string)), &phones); err != nil { return "", nil, "", nil, err } - sqlWhere += " AND t1.market_man_phone IN (" + dao.GenQuestionMarks(len(phones)) + ")" - sqlWhereParams = append(sqlWhereParams, phones) + if len(phones) > 0 { + sqlWhere += " AND t1.market_man_phone IN (" + dao.GenQuestionMarks(len(phones)) + ")" + sqlWhereParams = append(sqlWhereParams, phones) + } } if params["storeLevels"] != nil { var storeLevels []string