|
@@ -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
|