|
@@ -43,6 +43,8 @@ func generateTraceId(productType string) string {
|
|
|
func CountReport(record RecordCountDTO) (traceId string, err error) {
|
|
|
dao := convertUserToReportFlow(record)
|
|
|
if dao.TraceId == "" {
|
|
|
+ logger.Info("插入用户研报点击记录")
|
|
|
+ _ = GetUserAndCountReadTimes(record.UserId)
|
|
|
traceId = generateTraceId(string(dao.SourceType))
|
|
|
dao.TraceId = traceId
|
|
|
err = userDao.CountSourceClicks(dao)
|
|
@@ -62,7 +64,7 @@ func CountReport(record RecordCountDTO) (traceId string, err error) {
|
|
|
logger.Error("插入用户研报点击记录失败:%v", err)
|
|
|
return
|
|
|
}
|
|
|
- _ = GetUserAndCountReadTimes(record.UserId)
|
|
|
+
|
|
|
return
|
|
|
}
|
|
|
|
|
@@ -76,6 +78,8 @@ func CountMedia(record RecordCountDTO, mediaType string) (traceId string, err er
|
|
|
record.SourceType = sourceType
|
|
|
dao := convertUserToMediaFlow(record)
|
|
|
if dao.TraceId == "" {
|
|
|
+ logger.Info("插入用户媒体点击记录")
|
|
|
+ _ = GetUserAndCountReadTimes(record.UserId)
|
|
|
traceId = generateTraceId(string(dao.SourceType))
|
|
|
dao.TraceId = traceId
|
|
|
err = userDao.CountSourceClicks(dao)
|
|
@@ -95,7 +99,6 @@ func CountMedia(record RecordCountDTO, mediaType string) (traceId string, err er
|
|
|
logger.Error("插入用户媒体点击记录失败:%v", err)
|
|
|
return
|
|
|
}
|
|
|
- _ = GetUserAndCountReadTimes(record.UserId)
|
|
|
return
|
|
|
}
|
|
|
|