From 2dcbd1f8fbe7f622737480c3281f696beb46ac03 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, 22 Jan 2021 11:02:01 +0800 Subject: [PATCH] aa --- business/jxstore/cms/permission.go | 1 - business/jxstore/cms/store.go | 6 ++++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/business/jxstore/cms/permission.go b/business/jxstore/cms/permission.go index 2fb222c1e..ffac9d537 100644 --- a/business/jxstore/cms/permission.go +++ b/business/jxstore/cms/permission.go @@ -351,7 +351,6 @@ func GetUserStoresResultMap(userID string) (resultMap map[int]int, err error) { if cityCodeMap[0] != 0 { stores, err = dao.GetStoreList(db, nil, nil, nil, nil, nil, "") } else { - fmt.Println("22222222222222222222222222222222222222222", cityCodes, storeIDs) stores, err = dao.GetStoreList(db, storeIDs, cityCodes, nil, nil, nil, "") } } else { diff --git a/business/jxstore/cms/store.go b/business/jxstore/cms/store.go index e60b4b050..b07a641ef 100644 --- a/business/jxstore/cms/store.go +++ b/business/jxstore/cms/store.go @@ -343,8 +343,10 @@ func getStoresSql(ctx *jxcontext.Context, keyword string, params map[string]inte sqlWhereParams = append(sqlWhereParams, params["startStoreID"]) } if params["brandID"] != nil { - sqlWhere += " AND t1.brand_id = ?" - sqlWhereParams = append(sqlWhereParams, params["brandID"]) + if utils.MustInterface2Int64(params["brandID"]) != 0 { + sqlWhere += " AND t1.brand_id = ?" + sqlWhereParams = append(sqlWhereParams, params["brandID"]) + } } if params["name"] != nil { sqlWhere += " AND t1.name LIKE ?"