Browse Source

过滤下架产品

kobe6258 4 months ago
parent
commit
c48f319f9b

+ 2 - 2
domian/user/user_source_click_flow_service.go

@@ -59,7 +59,7 @@ func CountReport(record RecordCountDTO) (traceId string, err error) {
 			return
 		}
 		currTime := time.Now()
-		dbRecord.ReadDurationSeconds = int64(currTime.Sub(dbRecord.ClickTime).Seconds())
+		dbRecord.ReadDurationSeconds = currTime.Sub(dbRecord.ClickTime).Milliseconds()
 		err = userDao.UpdateSourceClicks(dbRecord)
 		logger.Info("插入用户研报点击记录")
 		_ = GetUserAndCountReadTimes(record.UserId)
@@ -97,7 +97,7 @@ func CountMedia(record RecordCountDTO, mediaType string) (traceId string, err er
 			_ = GetUserAndCountReadTimes(record.UserId)
 		}
 		currTime := time.Now()
-		dbRecord.ReadDurationSeconds = int64(currTime.Sub(dbRecord.ClickTime).Seconds())
+		dbRecord.ReadDurationSeconds = currTime.Sub(dbRecord.ClickTime).Milliseconds()
 		err = userDao.UpdateSourceClicks(dbRecord)
 		logger.Info("插入用户媒体点击记录")
 

+ 1 - 1
models/user/template_user.go

@@ -27,7 +27,7 @@ type TemplateUser struct {
 	OpenId           string        `gorm:"column:open_id;type:varchar(50);comment:open_id"`
 	GzhOpenId        string        `gorm:"column:gzh_open_id;type:varchar(255);comment:gzh_open_id"`
 	UnionId          string        `gorm:"column:union_id;type:varchar(50);comment:union_id"`
-	ReadCount        int           `gorm:"column:read_count;type:int(11);comment:阅读次数"`
+	unt              int           `gorm:"column:read_count;type:int(11);comment:阅读次数"`
 	FollowingGzh     int           `gorm:"column:following_gzh;type:int(1);comment:是否关注公众号"`
 	LastReadTime     time.Time     `gorm:"column:last_read_time;type:timestamps;comment:最后阅读时间"`
 	LastLoginTime    time.Time     `gorm:"column:last_login_time;type:timestamps;comment:最后登录时间"`

+ 1 - 1
task/report/report_update_task.go

@@ -16,7 +16,7 @@ import (
 
 var (
 	updateTaskName base.TaskType = "ReportUpdateSyncTask"
-	updateCron                   = "0 0 * * * *"
+	updateCron                   = "0 10 * * * *"
 	redisCache     *cache.RedisCache
 )