|
@@ -480,4 +480,14 @@ func GetUserMicroRoadshowCollectList(userId int) (items []*CygxArticleCollect, e
|
|
|
ORDER BY a.create_time DESC `
|
|
|
_, err = orm.NewOrm().Raw(sql, userId).QueryRows(&items)
|
|
|
return
|
|
|
-}
|
|
|
+}
|
|
|
+
|
|
|
+func GetUserMicroRoadshowCollectcount(userId int) (count int, err error) {
|
|
|
+ sqlCount := `SELECT SELECT COUNT(1) AS count FROM cygx_article_collect AS a
|
|
|
+ WHERE a.user_id=?
|
|
|
+ AND a.article_id =0
|
|
|
+ ORDER BY a.create_time DESC `
|
|
|
+ o := orm.NewOrm()
|
|
|
+ err = o.Raw(sqlCount, userId).QueryRow(&count)
|
|
|
+ return
|
|
|
+}
|