- comment

This commit is contained in:
gazebo
2018-09-06 09:50:17 +08:00
parent 88e1ba29e7
commit 1e3715456d
2 changed files with 7 additions and 7 deletions

View File

@@ -70,9 +70,9 @@ func GetStores(keyword string, params map[string]interface{}, offset, pageSize i
params2 := make([]interface{}, 0)
if keyword != "" {
sql += " (t1.name LIKE ? OR t1.address LIKE ? OR t1.tel1 LIKE ? OR t1.tel2 LIKE ? OR t1.last_operator LIKE ?"
keywordLike := "%" + keyword + "%"
params2 = append(params2, keywordLike, keywordLike, keywordLike, keywordLike, keywordLike)
sql += " (t1.name LIKE ? OR t1.address LIKE ? OR t1.tel1 LIKE ? OR t1.tel2 LIKE ? OR t1.last_operator LIKE ? OR city.name LIKE ?"
params2 = append(params2, keywordLike, keywordLike, keywordLike, keywordLike, keywordLike, keywordLike)
if keywordInt64, err2 := strconv.ParseInt(keyword, 10, 64); err2 == nil {
sql += " OR t1.id = ? OR t1.city_code = ? OR t1.district_code = ? OR t1.lng = ? OR t1.lat = ?"