소스 검색

Merge branch 'cygx_8.3' into debug

ziwen 2 년 전
부모
커밋
0b5f7407cd
1개의 변경된 파일9개의 추가작업 그리고 5개의 파일을 삭제
  1. 9 5
      controllers/report.go

+ 9 - 5
controllers/report.go

@@ -374,6 +374,7 @@ func (this *ReportController) IndustryList() {
 // @Title 产业下所关联的文章分类列表
 // @Description 产业下所关联的文章分类列表接口
 // @Param   IndustrialManagementId   query   int  true       "产业ID"
+// @Param   ShowTimeLine   query   int  true       "是否展示时间线 0不展示,1展示"
 // @Success 200 {object} models.IndustrialToArticleCategoryListRep
 // @router /toArticleCategoryList [get]
 func (this *ReportController) ArticleCategoryList() {
@@ -394,6 +395,7 @@ func (this *ReportController) ArticleCategoryList() {
 		br.Msg = "请输入分类ID"
 		return
 	}
+	showTimeLine, _ := this.GetInt("ShowTimeLine", 0)
 
 	detail, err := models.GetIndustrialManagementDetail(industrialManagementId)
 	if err != nil {
@@ -453,12 +455,14 @@ func (this *ReportController) ArticleCategoryList() {
 	}
 
 	//时间线
-	timeLineItem := models.IndustrialToArticleCategoryRep{
-		CategoryId:    99999,
-		MatchTypeName: "时间线",
-	}
+	if showTimeLine == 1{
+		timeLineItem := models.IndustrialToArticleCategoryRep{
+			CategoryId:    99999,
+			MatchTypeName: "时间线",
+		}
 
-	list = append([]*models.IndustrialToArticleCategoryRep{&timeLineItem}, list...)
+		list = append([]*models.IndustrialToArticleCategoryRep{&timeLineItem}, list...)
+	}
 
 	resp := new(models.IndustrialToArticleCategoryListRep)
 	resp.List = list