This commit is contained in:
苏尹岚
2021-01-22 11:02:01 +08:00
parent e758d5d8ed
commit 2dcbd1f8fb
2 changed files with 4 additions and 3 deletions

View File

@@ -351,7 +351,6 @@ func GetUserStoresResultMap(userID string) (resultMap map[int]int, err error) {
if cityCodeMap[0] != 0 { if cityCodeMap[0] != 0 {
stores, err = dao.GetStoreList(db, nil, nil, nil, nil, nil, "") stores, err = dao.GetStoreList(db, nil, nil, nil, nil, nil, "")
} else { } else {
fmt.Println("22222222222222222222222222222222222222222", cityCodes, storeIDs)
stores, err = dao.GetStoreList(db, storeIDs, cityCodes, nil, nil, nil, "") stores, err = dao.GetStoreList(db, storeIDs, cityCodes, nil, nil, nil, "")
} }
} else { } else {

View File

@@ -343,9 +343,11 @@ func getStoresSql(ctx *jxcontext.Context, keyword string, params map[string]inte
sqlWhereParams = append(sqlWhereParams, params["startStoreID"]) sqlWhereParams = append(sqlWhereParams, params["startStoreID"])
} }
if params["brandID"] != nil { if params["brandID"] != nil {
if utils.MustInterface2Int64(params["brandID"]) != 0 {
sqlWhere += " AND t1.brand_id = ?" sqlWhere += " AND t1.brand_id = ?"
sqlWhereParams = append(sqlWhereParams, params["brandID"]) sqlWhereParams = append(sqlWhereParams, params["brandID"])
} }
}
if params["name"] != nil { if params["name"] != nil {
sqlWhere += " AND t1.name LIKE ?" sqlWhere += " AND t1.name LIKE ?"
sqlWhereParams = append(sqlWhereParams, "%"+params["name"].(string)+"%") sqlWhereParams = append(sqlWhereParams, "%"+params["name"].(string)+"%")