Browse Source

no message

xingzai 1 year ago
parent
commit
373b73a6d9
4 changed files with 8 additions and 8 deletions
  1. 1 1
      controllers/article.go
  2. 1 1
      controllers/htgj.go
  3. 5 5
      services/article.go
  4. 1 1
      services/article_history.go

+ 1 - 1
controllers/article.go

@@ -1570,7 +1570,7 @@ func (this *ArticleCommonController) AddStopTimePublic() {
 						recordRedis.Email = user.Email
 						recordRedis.RealName = user.RealName
 						recordRedis.CompanyName = companyName
-						recordRedis.CreateTime = time.Now().Add(-time.Second * time.Duration(stopTime))
+						//recordRedis.CreateTime = time.Now().Add(-time.Second * time.Duration(stopTime))
 						go services.PushViewRecordNewRedisData(recordRedis, user.CompanyId)
 					} else {
 						go models.UpdateCygxArticleViewRecordNewpv(record, stopTime)

+ 1 - 1
controllers/htgj.go

@@ -787,7 +787,7 @@ func (this *BaseHtgjController) AddStopTimePublic() {
 						recordRedis.Email = user.Email
 						recordRedis.RealName = user.RealName
 						recordRedis.CompanyName = companyName
-						recordRedis.CreateTime = time.Now().Add(-time.Second * time.Duration(stopTime))
+						//recordRedis.CreateTime = time.Now().Add(-time.Second * time.Duration(stopTime))
 						go services.PushViewRecordNewRedisData(recordRedis, user.CompanyId)
 					} else {
 						go models.UpdateCygxArticleViewRecordNewpv(record, stopTime)

+ 5 - 5
services/article.go

@@ -547,11 +547,11 @@ type ReportViewRecord struct {
 // PushViewRecordNewRedisData 阅读数据加入到redis
 func PushViewRecordNewRedisData(reportViewRecord *ReportViewRecord, companyId int) bool {
 	data := &UserViewRedisData{
-		Mobile:          reportViewRecord.Mobile,
-		Email:           reportViewRecord.Email,
-		RealName:        reportViewRecord.RealName,
-		CompanyName:     reportViewRecord.CompanyName,
-		ViewTime:        reportViewRecord.CreateTime.Format(utils.FormatDateTime),
+		Mobile:      reportViewRecord.Mobile,
+		Email:       reportViewRecord.Email,
+		RealName:    reportViewRecord.RealName,
+		CompanyName: reportViewRecord.CompanyName,
+		//ViewTime:        reportViewRecord.CreateTime.Format(utils.FormatDateTime),
 		ProductId:       2,
 		CompanyId:       companyId,
 		ReportId:        reportViewRecord.ReportId,

+ 1 - 1
services/article_history.go

@@ -113,7 +113,7 @@ func ArticleHistoryStopTime(articleId, stopTime, outType int, user *models.WxUse
 		recordRedis.CompanyName = user.CompanyName
 		recordRedis.StopTime = stopTime
 		recordRedis.OutId = int(newId)
-		recordRedis.CreateTime = time.Now()
+		//recordRedis.CreateTime = time.Now()
 		go PushViewRecordNewRedisData(recordRedis, user.CompanyId)
 		utils.Rc.Put(key, 1, 2*time.Second)
 	}