kobe6258 4 сар өмнө
parent
commit
fcc28dd6ba

+ 2 - 2
domian/user/user_source_click_flow_service.go

@@ -55,7 +55,7 @@ func CountReport(record RecordCountDTO) (traceId string, err error) {
 			return
 		}
 		currTime := time.Now()
-		dbRecord.ReadDurationSeconds = currTime.Sub(dbRecord.ClickTime).Milliseconds()
+		dbRecord.ReadDurationSeconds = int64(currTime.Sub(dbRecord.ClickTime).Seconds())
 		err = userDao.UpdateSourceClicks(dbRecord)
 	}
 	if err != nil {
@@ -88,7 +88,7 @@ func CountMedia(record RecordCountDTO, mediaType string) (traceId string, err er
 			return
 		}
 		currTime := time.Now()
-		dbRecord.ReadDurationSeconds = currTime.Sub(dbRecord.ClickTime).Milliseconds()
+		dbRecord.ReadDurationSeconds = int64(currTime.Sub(dbRecord.ClickTime).Seconds())
 		err = userDao.UpdateSourceClicks(dbRecord)
 	}
 	if err != nil {