浏览代码

no message

zhangchuanxing 4 周之前
父节点
当前提交
2b39088803
共有 3 个文件被更改,包括 6 次插入2 次删除
  1. 2 1
      controllers/report.go
  2. 2 1
      controllers/tactics.go
  3. 2 0
      models/article.go

+ 2 - 1
controllers/report.go

@@ -4082,7 +4082,7 @@ func (this *ReportController) ZhouqiTacticsList() {
 	articleMapPv := services.GetArticleHistoryByArticleId(articleIds)                       //文章Pv
 	articleCollectMap, _ := services.GetCygxArticleCollectMap(user.UserId)                  //用户收藏的文章
 	articleCollectNumMap, _ := services.GetCygxArticleCollectNumMapByArtcileIds(articleIds) //文章收藏的数量
-
+	resp.IsShowAbstract = true
 	listResp := make([]*models.HomeArticle, 0)
 	for _, v := range listPublic {
 		item := new(models.HomeArticle)
@@ -4103,6 +4103,7 @@ func (this *ReportController) ZhouqiTacticsList() {
 		if v.ReportId > 0 {
 			item.Resource = 3
 		}
+		item.IsShowAbstract = resp.IsShowAbstract
 		listResp = append(listResp, item)
 	}
 	if len(listResp) == 0 {

+ 2 - 1
controllers/tactics.go

@@ -108,7 +108,7 @@ func (this *TacticsController) List() {
 			return
 		}
 		resp.MatchTypeName = detail.MatchTypeName
-		if detail.MatchTypeName == "热点问答" {
+		if detail.MatchTypeName == "热点问答" || detail.ChartPermissionName == utils.ZHOU_QI_NAME || detail.ChartPermissionName == utils.GU_SHOU_NAME {
 			resp.IsShowAbstract = true
 		}
 	}
@@ -130,6 +130,7 @@ func (this *TacticsController) List() {
 		if v.ReportId > 0 {
 			v.Resource = 3
 		}
+		v.IsShowAbstract = resp.IsShowAbstract
 	}
 	resp.List = list
 	resp.Paging = page

+ 2 - 0
models/article.go

@@ -131,6 +131,7 @@ type HomeArticle struct {
 	Resource            int                  `description:"来源类型,1:文章、2:产品内测"`
 	IsCollect           bool                 `description:"本人是否收藏"`
 	CollectNum          int                  `description:"收藏人数"`
+	IsShowAbstract      bool                 `description:"是否展示摘要"`
 	List                []*IndustrialManagementIdInt
 }
 
@@ -454,6 +455,7 @@ type ReportArticle struct {
 	IsCollect        bool   `description:"本人是否收藏"`
 	Pv               int    `description:"PV"`
 	CollectNum       int    `description:"收藏人数"`
+	IsShowAbstract   bool   `description:"是否展示摘要"`
 }
 
 type ReportMappingCategoryRep struct {