ziwen il y a 2 ans
Parent
commit
cb14129ccc
1 fichiers modifiés avec 11 ajouts et 0 suppressions
  1. 11 0
      controllers/report.go

+ 11 - 0
controllers/report.go

@@ -2754,6 +2754,17 @@ func (this *ReportController) SearchReportAndResource() {
 	}
 
 	for k, v := range listYxResource {
+		// 关联报告发布时间均在3个月内则标记New
+		if v.MinReportTime != "" {
+			t, e := time.Parse(utils.FormatDateTime, v.MinReportTime)
+			if e != nil {
+				err = errors.New("报告最早发布时间有误,GetindustryVideo " + e.Error())
+				return
+			}
+			if t.After(threeMonBefore) {
+				listHzResource[k].IsNew = true
+			}
+		}
 		listYxResource[k].Source = 2
 		if fllowMap[v.IndustrialManagementId] > 0 {
 			listYxResource[k].IsFollw = true