|
@@ -218,10 +218,6 @@ func HandleArticleCategoryImg(list []*models.HomeArticle) (items []*models.HomeA
|
|
|
list[k].Annotation = ArticleAnnotation(item)
|
|
|
list[k].Body = ""
|
|
|
list[k].PublishDate = utils.StrTimeToTime(item.PublishDate).Format(utils.FormatDate) //时间字符串格式转时间格式
|
|
|
- if item.Pv > 999 {
|
|
|
- list[k].Pv = 999
|
|
|
- }
|
|
|
-
|
|
|
list[k].ChartPermissionName = mapChartPerssion[v.CategoryId]
|
|
|
//如果是研选系列的任意取五张图片的中的一张
|
|
|
if v.CategoryId == "0" || v.ArticleId > utils.SummaryArticleId {
|
|
@@ -236,17 +232,6 @@ func HandleArticleCategoryImg(list []*models.HomeArticle) (items []*models.HomeA
|
|
|
list[k].HttpUrl = utils.StrategyPlatform + strconv.Itoa(v.ArticleId)
|
|
|
list[k].IsNeedJump = true
|
|
|
list[k].ArticleResponse = 1
|
|
|
- //if v.IsReport == 1 {
|
|
|
- // list[k].ArticleResponse = 1
|
|
|
- //} else if v.ArticleTypeName == "纪要" {
|
|
|
- // list[k].ArticleResponse = 2
|
|
|
- //} else if v.ArticleTypeName == "观点" {
|
|
|
- // list[k].ArticleResponse = 3
|
|
|
- //} else if v.ArticleTypeName == "沙龙" {
|
|
|
- // list[k].ArticleResponse = 3
|
|
|
- //} else if v.ArticleTypeName == "路演精华" {
|
|
|
- // list[k].ArticleResponse = 1
|
|
|
- //}
|
|
|
}
|
|
|
list[k].Source = 1
|
|
|
//添加行业默认图片
|
|
@@ -280,6 +265,7 @@ func HandleArticleCategoryImg(list []*models.HomeArticle) (items []*models.HomeA
|
|
|
for i := range list {
|
|
|
articleIds = append(articleIds, list[i].ArticleId)
|
|
|
}
|
|
|
+ articleMapPv := GetArticleHistoryByArticleId(articleIds) //文章Pv
|
|
|
// 报告关联产业信息
|
|
|
industryMap := make(map[int][]*models.IndustrialManagementIdInt, 0)
|
|
|
if len(articleIds) > 0 {
|
|
@@ -308,6 +294,10 @@ func HandleArticleCategoryImg(list []*models.HomeArticle) (items []*models.HomeA
|
|
|
} else {
|
|
|
list[k].List = make([]*models.IndustrialManagementIdInt, 0)
|
|
|
}
|
|
|
+ v.Pv = articleMapPv[v.ArticleId]
|
|
|
+ if v.Pv > 999 {
|
|
|
+ list[k].Pv = 999
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
if len(list) == 0 {
|