|
@@ -449,12 +449,12 @@ func HandleIndustryList(list []*models.IndustrialManagement, user *models.WxUser
|
|
|
for _, v := range mmList {
|
|
|
morningMeetingTimeMap[v.IndustryId] = v.CreateTime
|
|
|
}
|
|
|
- timeLineRed := false
|
|
|
+ timeLineRedMap := make(map[int]bool, 0)
|
|
|
|
|
|
for _, industrialId := range industrialIdArr {
|
|
|
if createTime, ok := industrialIdMap[strconv.Itoa(industrialId)]; ok{
|
|
|
if createTime.Before(morningMeetingTimeMap[industrialId]) {
|
|
|
- timeLineRed = true
|
|
|
+ timeLineRedMap[industrialId] = true
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -463,7 +463,7 @@ func HandleIndustryList(list []*models.IndustrialManagement, user *models.WxUser
|
|
|
list[k].UpdateTime = utils.TimeRemoveHms(mapUPdateTime[v.IndustrialManagementId])
|
|
|
if userId > 0 {
|
|
|
//如果文章没有阅读,而且,文章的发布时间晚于项目的上线时间,而且文章的发布时间晚于用户的注册时间,就进行标红处理
|
|
|
- if mapHistroyindustrialId[v.IndustrialManagementId] == 0 || timeLineRed {
|
|
|
+ if mapHistroyindustrialId[v.IndustrialManagementId] == 0 || timeLineRedMap[v.IndustrialManagementId] {
|
|
|
if user.CreatedTime.Before(utils.StrTimeToTime(mapUPdateTime[v.IndustrialManagementId])) && utils.StrTimeToTime(utils.OnlineTime).Before(utils.StrTimeToTime(mapUPdateTime[v.IndustrialManagementId])) {
|
|
|
list[k].IsRed = true
|
|
|
}
|
|
@@ -478,13 +478,10 @@ func HandleIndustryList(list []*models.IndustrialManagement, user *models.WxUser
|
|
|
list[k].UpdateTime = utils.TimeRemoveHms(mapUPdateTime[v.IndustrialManagementId])
|
|
|
if userId > 0 {
|
|
|
//如果文章没有阅读,而且,文章的发布时间晚于项目的上线时间,而且文章的发布时间晚于用户的注册时间,就进行标红处理
|
|
|
- //if user.CreatedTime.Before(utils.StrTimeToTime(mapUPdateTime[v.IndustrialManagementId])) && utils.StrTimeToTime(utils.OnlineTime).Before(utils.StrTimeToTime(mapUPdateTime[v.IndustrialManagementId])) {
|
|
|
- // list[k].IsRed = true
|
|
|
- //}
|
|
|
-
|
|
|
- //9.2修改为只要有未读的就标红
|
|
|
- if mapHistroyindustrialId[v.IndustrialManagementId] == 0 || timeLineRed {
|
|
|
- list[k].IsRed = true
|
|
|
+ if mapHistroyindustrialId[v.IndustrialManagementId] == 0 || timeLineRedMap[v.IndustrialManagementId] {
|
|
|
+ if user.CreatedTime.Before(utils.StrTimeToTime(mapUPdateTime[v.IndustrialManagementId])) && utils.StrTimeToTime(utils.OnlineTime).Before(utils.StrTimeToTime(mapUPdateTime[v.IndustrialManagementId])) {
|
|
|
+ list[k].IsRed = true
|
|
|
+ }
|
|
|
}
|
|
|
} else {
|
|
|
if utils.StrTimeToTime(utils.OnlineTime).Before(utils.StrTimeToTime(mapUPdateTime[v.IndustrialManagementId])) {
|