Browse Source

no message

xingzai 2 years ago
parent
commit
25201a726a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      models/user.go

+ 1 - 1
models/user.go

@@ -155,7 +155,7 @@ func GetArticleUserCollectCount(userId int) (count int, err error) {
 
 func GetArticleUserCollectList(startSize, pageSize, userId int) (items []*ArticleCollectList, err error) {
 	sql := `SELECT a.* FROM cygx_article_collect AS a INNER JOIN cygx_article as art ON art.article_id = a.article_id
-			WHERE a.user_id=?  AND art.publish_status = 1
+			WHERE a.user_id=?  AND art.publish_status = 1  AND DATE_SUB( CURDATE(), INTERVAL 30 DAY ) <= date( a.create_time ) 
            ORDER BY a.create_time DESC LIMIT ?,? `
 	_, err = orm.NewOrm().Raw(sql, userId, startSize, pageSize).QueryRows(&items)
 	return