LingxinMeng 1 年間 前
コミット
29eb757d0f
1 ファイル変更3 行追加2 行削除
  1. 3 2
      amd64/score_server/handler/h_exam.go

+ 3 - 2
amd64/score_server/handler/h_exam.go

@@ -54,9 +54,10 @@ func Tick(c *gin.Context) {
 
 		result := mapper.SelectLatestByTeamName(teamName)
 		if len(result) == 1 {
-			c_log.GlobalLogger.Info("上一条数据记录为:", result[0])
 			// 判断上一条记录的开始时间和当前时间是否小于2分钟
-			if time.Since(result[0].BeginTime).Minutes() < 2 {
+			temp := time.Since(result[0].BeginTime).Minutes()
+			c_log.GlobalLogger.Infof("上一条数据记录为【%v】,距离当前时间为【%v】分钟", result[0].Id, temp)
+			if temp < 2 {
 				// 添加队伍名到缓存中
 				cacheTeamName.Store(teamName, time.Now())
 				// 更新记录结束时间为默认时间