Browse Source

no message

xingzai 2 years ago
parent
commit
abcb69b6ec
1 changed files with 3 additions and 4 deletions
  1. 3 4
      controllers/report.go

+ 3 - 4
controllers/report.go

@@ -258,8 +258,8 @@ func (this *MobileReportController) IndustryList() {
 	}
 
 	industrialIdArr := make([]int, 0)
-	for k, _ := range list {
-		//industrialIdArr = append(industrialIdArr, v.IndustrialManagementId)
+	for k, v := range list {
+		industrialIdArr = append(industrialIdArr, v.IndustrialManagementId)
 		//if v.ArticleReadNum >= detailHot3.ArticleReadNum {
 		//	list[k].IsHot = true
 		//}
@@ -271,13 +271,13 @@ func (this *MobileReportController) IndustryList() {
 	mapHistroyArticleId := make(map[int]int)
 	articleIdArr := make([]int, 0)
 	//获取这些产业下最新更新的文章
-	fmt.Println(industrialIdArr)
 	listUpdateTime, err := models.GetNewArticleDetailByIndustrialIds(industrialIdArr)
 	if err != nil && err.Error() != utils.ErrNoRow() {
 		br.Msg = "获取信息失败"
 		br.ErrMsg = "获取信息失败 GetNewArticleDetailByIndustrialIds ,Err:" + err.Error()
 		return
 	}
+	fmt.Println(listUpdateTime)
 	for _, v := range listUpdateTime {
 		mapUPdateTime[v.IndustrialManagementId] = v.PublishDate
 		articleIdArr = append(articleIdArr, v.ArticleId)
@@ -309,7 +309,6 @@ func (this *MobileReportController) IndustryList() {
 			list[k].IsFollow = false
 		}
 		// 关联报告发布时间均在3个月内则标记New
-		fmt.Println(v.MinReportTime)
 		if v.MinReportTime != "" {
 			t, e := time.Parse(utils.FormatDateTime, v.MinReportTime)
 			if e != nil {