- 查询门店关键字在门店地址中查询

This commit is contained in:
gazebo
2019-04-03 20:22:19 +08:00
parent 66869ed853
commit d20d6e1df4

View File

@@ -149,8 +149,8 @@ func GetStores(ctx *jxcontext.Context, keyword string, params map[string]interfa
}
if keyword != "" {
keywordLike := "%" + keyword + "%"
sqlWhere += " AND (t1.name LIKE ? OR t1.tel1 LIKE ? OR t1.tel2 LIKE ? OR t1.last_operator LIKE ? OR city.name LIKE ?"
sqlWhereParams = append(sqlWhereParams, keywordLike, keywordLike, keywordLike, keywordLike, keywordLike)
sqlWhere += " AND (t1.name LIKE ? OR t1.tel1 LIKE ? OR t1.tel2 LIKE ? OR t1.last_operator LIKE ? OR city.name LIKE ? OR t1.address LIKE ?"
sqlWhereParams = append(sqlWhereParams, keywordLike, keywordLike, keywordLike, keywordLike, keywordLike, keywordLike)
if keywordInt64, err2 := strconv.ParseInt(keyword, 10, 64); err2 == nil {
if jxutils.IsLegalMobileNumber(keywordInt64) {