|
@@ -8,7 +8,7 @@ import (
|
|
|
"time"
|
|
|
)
|
|
|
|
|
|
-//报告榜单
|
|
|
+// 报告榜单
|
|
|
type ReportBillboardController struct {
|
|
|
BaseAuthController
|
|
|
}
|
|
@@ -341,6 +341,10 @@ func (this *ReportBillboardController) ReadList() {
|
|
|
articleIds = append(articleIds, list[i].ArticleId)
|
|
|
}
|
|
|
|
|
|
+ articleMapPv := services.GetArticleHistoryByArticleId(articleIds) //文章Pv
|
|
|
+ articleCollectMap, _ := services.GetCygxArticleCollectMap(user.UserId) //用户收藏的文章
|
|
|
+ articleCollectNumMap, _ := services.GetCygxArticleCollectNumMapByArtcileIds(articleIds) //文章收藏的数量
|
|
|
+
|
|
|
// 报告关联产业信息
|
|
|
industryMap := make(map[int][]*models.IndustrialManagementIdInt, 0)
|
|
|
if len(articleIds) > 0 {
|
|
@@ -369,6 +373,9 @@ func (this *ReportBillboardController) ReadList() {
|
|
|
} else {
|
|
|
list[k].List = make([]*models.IndustrialManagementIdInt, 0)
|
|
|
}
|
|
|
+ v.Pv = articleMapPv[v.ArticleId]
|
|
|
+ v.IsCollect = articleCollectMap[v.ArticleId]
|
|
|
+ v.CollectNum = articleCollectNumMap[v.ArticleId]
|
|
|
}
|
|
|
|
|
|
resp := new(models.ArticleReportBillboardLIstResp)
|