Explorar o código

策略平台搜搜记录历史方法处理

xingzai %!s(int64=2) %!d(string=hai) anos
pai
achega
402f5e7ca1
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      models/search_key_word.go

+ 1 - 1
models/search_key_word.go

@@ -64,7 +64,7 @@ func UpdateCygxSearchKeyWord(wxUser *WxUserItem) (err error) {
 //GetSearchKeyWordByUser 获取用户搜索历史记录
 func GetSearchKeyWordByUser(uid int) (items []*KeyWord, err error) {
 	o := orm.NewOrm()
-	sql := `SELECT key_word, MAX( id ) AS maxId  FROM	cygx_search_key_word WHERE	user_id = ? GROUP BY	key_word ORDER BY	maxId DESC 	LIMIT 8 `
+	sql := `SELECT key_word, MAX( id ) AS maxId  FROM	cygx_search_key_word_log WHERE	user_id = ? GROUP BY	key_word ORDER BY	maxId DESC 	LIMIT 8 `
 	_, err = o.Raw(sql, uid).QueryRows(&items)
 	return
 }