Browse Source

Merge branch 'cygx_9.2' into debug

ziwen 2 years ago
parent
commit
a744e2830e
1 changed files with 6 additions and 6 deletions
  1. 6 6
      controllers/report.go

+ 6 - 6
controllers/report.go

@@ -392,7 +392,7 @@ func (this *ReportController) ArticleCategoryList() {
 			return
 		}
 		var recordItem *models.CygxPageHistoryRecord
-		if count > 0 {
+		if count > 1 {
 			recordItem, err = models.GetTimeLineRecordItem(user.UserId, industrialManagementId)
 			if err != nil {
 				br.Msg = "查询浏览记录失败"
@@ -413,9 +413,9 @@ func (this *ReportController) ArticleCategoryList() {
 		}
 		//因为无法记录用户是否看过晨会点评,所以用用户今天是否看过时间线来判断是否显示小红点,这里是判断分类的小红点
 		timeLineRed := false
-		if count == 0 {
+		if count < 2 {
 			timeLineRed = true
-		} else if count > 0 && recordItem.CreateTime.Before(utils.StrTimeToTime(morningMeetingTime)){
+		} else if count > 1 && recordItem.CreateTime.Before(utils.StrTimeToTime(morningMeetingTime)){
 			timeLineRed = true
 		}
 		if !timeLineItem.IsRed && timeLineRed && haveMorningMeeting {
@@ -667,7 +667,7 @@ func (this *ReportController) List() {
 			return
 		}
 		var recordItem *models.CygxPageHistoryRecord
-		if count > 0 {
+		if count > 1 {
 			recordItem, err = models.GetTimeLineRecordItem(user.UserId, industrialManagementId)
 			if err != nil {
 				br.Msg = "查询浏览记录失败"
@@ -681,9 +681,9 @@ func (this *ReportController) List() {
 				list[k].IsRed = true
 			}
 			timeLineRed := false
-			if count == 0 {
+			if count < 2 {
 				timeLineRed = true
-			} else if count > 0 && recordItem.CreateTime.Before(utils.StrTimeToTime(v.PublishTime)){
+			} else if count > 1 && recordItem.CreateTime.Before(utils.StrTimeToTime(v.PublishTime)){
 				timeLineRed = true
 			}
 			if v.SubCategoryName == "时间线" && timeLineRed {