瀏覽代碼

no message

xingzai 2 年之前
父節點
當前提交
25201a726a
共有 1 個文件被更改,包括 1 次插入1 次删除
  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) {
 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
 	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 ?,? `
            ORDER BY a.create_time DESC LIMIT ?,? `
 	_, err = orm.NewOrm().Raw(sql, userId, startSize, pageSize).QueryRows(&items)
 	_, err = orm.NewOrm().Raw(sql, userId, startSize, pageSize).QueryRows(&items)
 	return
 	return