ziwen 2 years ago
parent
commit
12f10c1625
2 changed files with 6 additions and 4 deletions
  1. 5 4
      controllers/report.go
  2. 1 0
      models/report.go

+ 5 - 4
controllers/report.go

@@ -2737,7 +2737,7 @@ func (this *ReportController) SearchReportAndResource() {
 	mapHot := make(map[string]int)
 
 	hotCondition := ` ORDER BY sum_num DESC  `
-	listHot, err := models.GetThemeHeatList(user.UserId, hotCondition, 0, pageSize)
+	listHot, err := models.GetThemeHeatList(user.UserId, hotCondition, 0, 3)
 	if err != nil {
 		br.Msg = "获取信息失败"
 		br.ErrMsg = "获取品种信息失败,Err:" + err.Error()
@@ -2759,9 +2759,10 @@ func (this *ReportController) SearchReportAndResource() {
 				listHzResource[k].IsNew = true
 			}
 		}
-		if mapHot[v.IndustryName] > 0 {
-			listHzResource[k].IsHot = true
-		}
+		//弘则资源包不展示hot标签
+		//if mapHot[v.IndustryName] > 0 {
+		//	listHzResource[k].IsHot = true
+		//}
 		listHzResource[k].Source = 1
 		if fllowMap[v.IndustrialManagementId] > 0 {
 			listHzResource[k].IsFollw = true

+ 1 - 0
models/report.go

@@ -426,6 +426,7 @@ func GetThemeHeatList(userId int, condition string, startSize, pageSize int) (it
 			m.industrial_management_id,
 			m.article_read_num,
           	MAX( a.publish_date ) AS publish_date,
+			MIN(a.publish_date) AS min_report_time,
 			( SELECT count( 1 ) FROM cygx_industry_fllow AS f  WHERE f.industrial_management_id = m.industrial_management_id  AND user_id =? AND f.type = 1  ) AS fllow_num,
 			m.article_read_num + ( SELECT count( 1 ) FROM cygx_activity_meet_detail_log AS la  WHERE la.activity_id  IN  (SELECT activity_id FROM cygx_industrial_activity_group_management WHERE industrial_management_id = m.industrial_management_id  ) AND DATE_SUB( CURDATE(), INTERVAL 30 DAY ) <= date( la.activity_time ) ) AS sum_num
 		FROM