|
@@ -268,6 +268,7 @@ func (this *ReportController) IndustryList() {
|
|
br.ErrMsg = "获取用户权限失败, Err: " + e.Error()
|
|
br.ErrMsg = "获取用户权限失败, Err: " + e.Error()
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+ mapUPdateTime := make(map[int]string)
|
|
|
|
|
|
if len(industrialManagementIds) > 0 {
|
|
if len(industrialManagementIds) > 0 {
|
|
// 获取默认图配置
|
|
// 获取默认图配置
|
|
@@ -299,6 +300,28 @@ func (this *ReportController) IndustryList() {
|
|
}
|
|
}
|
|
industrialVideoMap[v.IndustryId] = tmp
|
|
industrialVideoMap[v.IndustryId] = tmp
|
|
}
|
|
}
|
|
|
|
+ //获取这些产业下最新更新的文章
|
|
|
|
+ listUpdateTime, err := models.GetNewArticleDetailByIndustrialIds(industrialManagementIds)
|
|
|
|
+ if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ for _, v := range listUpdateTime {
|
|
|
|
+ mapUPdateTime[v.IndustrialManagementId] = v.PublishDate
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //时间线的更新时间
|
|
|
|
+ // maptimelineUPdateTime := make(map[int]string)
|
|
|
|
+ listtimelinePublishdate, err := models.GetTimeLineReportIndustrialPublishdateList(industrialManagementIds)
|
|
|
|
+ if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ for _, v := range listtimelinePublishdate {
|
|
|
|
+ if mapUPdateTime[v.IndustrialManagementId] != "" {
|
|
|
|
+ if utils.StrTimeToTime(v.PublishDate).After(utils.StrTimeToTime(mapUPdateTime[v.IndustrialManagementId])) {
|
|
|
|
+ mapUPdateTime[v.IndustrialManagementId] = v.PublishDate
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
nowTime := time.Now().Local()
|
|
nowTime := time.Now().Local()
|
|
@@ -318,7 +341,7 @@ func (this *ReportController) IndustryList() {
|
|
br.ErrMsg = "获取品种信息失败,Err:" + err.Error()
|
|
br.ErrMsg = "获取品种信息失败,Err:" + err.Error()
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- list[k].UpdateTime = utils.TimeRemoveHms(newArtinfo.PublishDate)
|
|
|
|
|
|
+ list[k].UpdateTime = utils.TimeRemoveHms(mapUPdateTime[v.IndustrialManagementId])
|
|
recordCount, err := models.GetUserToArticleCount(uid, newArtinfo.ArticleId)
|
|
recordCount, err := models.GetUserToArticleCount(uid, newArtinfo.ArticleId)
|
|
if err != nil && err.Error() != utils.ErrNoRow() {
|
|
if err != nil && err.Error() != utils.ErrNoRow() {
|
|
br.Msg = "获取信息失败"
|
|
br.Msg = "获取信息失败"
|