|
@@ -136,6 +136,7 @@ func (this *ResearchController) CollectionList() {
|
|
|
}
|
|
|
articleIds = append(articleIds, v.ArticleId)
|
|
|
}
|
|
|
+ articleMapPv := services.GetArticleHistoryByArticleId(articleIds) //文章Pv
|
|
|
//处理关联的产业
|
|
|
industrialMap, err := services.GetArticleIndustrialByArticleId(articleIds)
|
|
|
if err != nil {
|
|
@@ -150,6 +151,7 @@ func (this *ResearchController) CollectionList() {
|
|
|
list[k].List = make([]*models.IndustrialManagementResp, 0)
|
|
|
}
|
|
|
list[k].PublishDate = utils.StrTimeToTime(v.PublishDate).Format(utils.FormatDate) //时间字符串格式转时间格式
|
|
|
+ list[k].Pv = articleMapPv[v.ArticleId]
|
|
|
}
|
|
|
resp := new(models.ArticleCollectionLIstResp)
|
|
|
resp.List = list
|
|
@@ -785,6 +787,8 @@ func (this *ResearchController) ArticleNewList() {
|
|
|
articleCollectNumMap, _ := services.GetCygxArticleCollectNumMapByArtcileIds(articleIds) //文章收藏的数量
|
|
|
articleCollectYanxuanSpecialMap, _ := services.GetYanxuanSpecialCollectMap(user.UserId) //用户收藏的研选专栏
|
|
|
|
|
|
+ pvMap := services.GetYanxuanSpecialRecordByYanxuanSpecialId(articleIdsSpecialArr)
|
|
|
+
|
|
|
//处理关联的产业
|
|
|
industrialMap, err := services.GetArticleIndustrialByArticleId(articleIds)
|
|
|
if err != nil {
|
|
@@ -795,6 +799,7 @@ func (this *ResearchController) ArticleNewList() {
|
|
|
for k, v := range list {
|
|
|
if v.IsSpecial == 1 {
|
|
|
v.IsCollect = articleCollectYanxuanSpecialMap[v.ArticleId]
|
|
|
+ v.Pv = pvMap[v.ArticleId]
|
|
|
} else {
|
|
|
v.Pv = articleMapPv[v.ArticleId]
|
|
|
v.CollectNum = articleCollectNumMap[v.ArticleId]
|