|
@@ -213,14 +213,14 @@ func HandleIndustryList(list []*models.IndustrialManagement, user *models.WxUser
|
|
|
//查询用户今天是否看过时间线
|
|
|
//haveMorningMeeting := false
|
|
|
//var morningMeetingTime string
|
|
|
- recrodList, err := models.GetTimeLineRecordAllCount(user.UserId, time.Now().Format(utils.FormatDateTime))
|
|
|
+ recrodList, err := models.GetTimeLineRecordAllCount(user.UserId, time.Now().Format(utils.FormatDate))
|
|
|
if err != nil {
|
|
|
return
|
|
|
}
|
|
|
var industrialManagementIdstr string
|
|
|
industrialIdMap := make(map[string]time.Time)
|
|
|
for _, v := range recrodList {
|
|
|
- industrialManagementIdstr = strings.TrimLeft(v.Parameter, "PageSize=10&CurrentIndex=1&CategoryId=99999&IndustrialManagementId=")
|
|
|
+ industrialManagementIdstr = strings.TrimLeft(v.Router, utils.TIME_LINE_ROUTE)
|
|
|
if createTime, ok := industrialIdMap[industrialManagementIdstr]; ok {
|
|
|
if createTime.Before(v.CreateTime) {
|
|
|
industrialIdMap[industrialManagementIdstr] = v.CreateTime
|
|
@@ -241,13 +241,15 @@ func HandleIndustryList(list []*models.IndustrialManagement, user *models.WxUser
|
|
|
timeLineRedMap := make(map[int]bool, 0)
|
|
|
|
|
|
for _, industrialId := range industrialIdArr {
|
|
|
- if createTime, ok := industrialIdMap[strconv.Itoa(industrialId)]; ok {
|
|
|
- if createTime.Before(morningMeetingTimeMap[industrialId]) {
|
|
|
- timeLineRedMap[industrialId] = true
|
|
|
- }
|
|
|
+ //if createTime, ok := industrialIdMap[strconv.Itoa(industrialId)]; ok {
|
|
|
+ // if createTime.Before(morningMeetingTimeMap[industrialId]) {
|
|
|
+ // timeLineRedMap[industrialId] = true
|
|
|
+ // }
|
|
|
+ //}
|
|
|
+ if industrialIdMap[strconv.Itoa(industrialId)].Before(morningMeetingTimeMap[industrialId]) {
|
|
|
+ timeLineRedMap[industrialId] = true
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
for k, v := range list {
|
|
|
list[k].UpdateTime = utils.TimeRemoveHms(mapUPdateTime[v.IndustrialManagementId])
|
|
|
if userId > 0 {
|