|
@@ -2,6 +2,7 @@ package controllers
|
|
|
|
|
|
import (
|
|
|
"encoding/json"
|
|
|
+ "errors"
|
|
|
"fmt"
|
|
|
"github.com/medivhzhan/weapp/v2"
|
|
|
"github.com/rdlucklib/rdluck_tools/paging"
|
|
@@ -2731,7 +2732,20 @@ func (this *ReportController) SearchReportAndResource() {
|
|
|
return
|
|
|
}
|
|
|
industrialIdArr := make([]int, 0)
|
|
|
+ nowTime := time.Now().Local()
|
|
|
+ threeMonBefore := nowTime.AddDate(0, -3, 0)
|
|
|
for k, v := range listHzResource {
|
|
|
+ // 关联报告发布时间均在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
|
|
|
+ }
|
|
|
+ }
|
|
|
listHzResource[k].Source = 1
|
|
|
if fllowMap[v.IndustrialManagementId] > 0 {
|
|
|
listHzResource[k].IsFollw = true
|