|
@@ -383,14 +383,18 @@ func (this *ReportController) ArticleCategoryList() {
|
|
|
return
|
|
|
}
|
|
|
//查询用户今天是否看过时间线
|
|
|
+ haveMorningMeeting := false
|
|
|
count, err := models.GetTimeLineRecordCount(user.UserId, industrialManagementId, time.Now().Format(utils.FormatDate))
|
|
|
for _, v := range timeLineList {
|
|
|
if v.Readnum == 0 && user.CreatedTime.Before(utils.StrTimeToTime(v.PublishTime)) && utils.StrTimeToTime(utils.OnlineTime).Before(utils.StrTimeToTime(v.PublishTime)) {
|
|
|
timeLineItem.IsRed = true
|
|
|
+ if v.SubCategoryName == "时间线" {
|
|
|
+ haveMorningMeeting = true
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
//因为无法记录用户是否看过晨会点评,所以用用户今天是否看过时间线来判断是否显示小红点,这里是判断分类的小红点
|
|
|
- if !timeLineItem.IsRed && count == 0{
|
|
|
+ if !timeLineItem.IsRed && count == 0 && haveMorningMeeting {
|
|
|
timeLineItem.IsRed = true
|
|
|
}
|
|
|
list = append([]*models.IndustrialToArticleCategoryRep{&timeLineItem}, list...)
|