|
@@ -102,7 +102,7 @@ type CygxArticleHistoryRecordAll struct {
|
|
|
// 根据用户ID,文章ID获取用户最新一条阅读记录
|
|
|
func GetCygxArticleHistoryRecordAllDetailLast(articleId, userId int) (item *CygxArticleHistoryRecordAll, err error) {
|
|
|
o := orm.NewOrmUsingDB("hz_cygx")
|
|
|
- sql := `SELECT * FROM cygx_article_history_record_all WHERE article_id = ? AND user_id = ? AND is_del = 0 ORDER BY id DESC LIMIT 1 `
|
|
|
+ sql := `SELECT * FROM cygx_article_history_record_all WHERE article_id = ? AND user_id = ? AND is_del = 0 AND stop_time > 0 ORDER BY id DESC LIMIT 1 `
|
|
|
err = o.Raw(sql, articleId, userId).QueryRow(&item)
|
|
|
return
|
|
|
}
|