- fix GetStores bug.
- isFocus on sku name.
This commit is contained in:
@@ -48,7 +48,7 @@ func GetStores(keyword string, params map[string]interface{}, offset, pageSize i
|
||||
sqlParams := make([]interface{}, 0)
|
||||
if keyword != "" {
|
||||
keywordLike := "%" + keyword + "%"
|
||||
sqlWhere += " (t1.name LIKE ? OR t1.address LIKE ? OR t1.tel1 LIKE ? OR t1.tel2 LIKE ? OR t1.last_operator LIKE ? OR city.name LIKE ?"
|
||||
sqlWhere += " AND (t1.name LIKE ? OR t1.address LIKE ? OR t1.tel1 LIKE ? OR t1.tel2 LIKE ? OR t1.last_operator LIKE ? OR city.name LIKE ?"
|
||||
sqlParams = append(sqlParams, keywordLike, keywordLike, keywordLike, keywordLike, keywordLike, keywordLike)
|
||||
|
||||
if keywordInt64, err2 := strconv.ParseInt(keyword, 10, 64); err2 == nil {
|
||||
@@ -56,8 +56,6 @@ func GetStores(keyword string, params map[string]interface{}, offset, pageSize i
|
||||
sqlParams = append(sqlParams, keywordInt64, keywordInt64, keywordInt64, keywordInt64, keywordInt64)
|
||||
}
|
||||
sqlWhere += ")"
|
||||
} else {
|
||||
sqlWhere += " 1 = 1"
|
||||
}
|
||||
|
||||
if params["storeID"] != nil {
|
||||
|
||||
Reference in New Issue
Block a user