|
@@ -39,14 +39,13 @@ func GetNewArticleHistoryRecordNewpv(uid, articleId int, modifytime string) (ite
|
|
func UpdateCygxArticleViewRecordNewpv(itemRep *CygxArticleHistoryRecordNewpv, stopTime int) (err error) {
|
|
func UpdateCygxArticleViewRecordNewpv(itemRep *CygxArticleHistoryRecordNewpv, stopTime int) (err error) {
|
|
o := orm.NewOrm()
|
|
o := orm.NewOrm()
|
|
sql := `UPDATE cygx_article_history_record_newpv
|
|
sql := `UPDATE cygx_article_history_record_newpv
|
|
- SET stop_time = stop_time + ` + strconv.Itoa(stopTime) + `
|
|
|
|
|
|
+ SET modify_time = NOW(), stop_time = stop_time + ` + strconv.Itoa(stopTime) + `
|
|
WHERE
|
|
WHERE
|
|
article_id = ?
|
|
article_id = ?
|
|
- AND user_id = ?
|
|
|
|
- AND modify_time = ?
|
|
|
|
|
|
+ AND user_id = ?
|
|
AND out_type = 2
|
|
AND out_type = 2
|
|
AND timestampdiff(MINUTE,modify_time,NOW()) < 10`
|
|
AND timestampdiff(MINUTE,modify_time,NOW()) < 10`
|
|
- _, err = o.Raw(sql, itemRep.ArticleId, itemRep.UserId, itemRep.ModifyTime).Exec()
|
|
|
|
|
|
+ _, err = o.Raw(sql, itemRep.ArticleId, itemRep.UserId).Exec()
|
|
|
|
|
|
return
|
|
return
|
|
}
|
|
}
|