From b03c6684f273ec81afd1563f69a904723775ca14 Mon Sep 17 00:00:00 2001 From: youys <1272586223@qq.com> Date: Thu, 7 Apr 2022 16:57:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=97=A5=E5=BF=97=E6=89=93?= =?UTF-8?q?=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/net/educoder/controller/CallbackController.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/educoder/controller/CallbackController.java b/src/main/java/net/educoder/controller/CallbackController.java index 644e050..7f29be1 100644 --- a/src/main/java/net/educoder/controller/CallbackController.java +++ b/src/main/java/net/educoder/controller/CallbackController.java @@ -51,7 +51,7 @@ public class CallbackController { String decodeOutPut = Base64.decodeStr(outPut); log.info("tpiID:{}, decodeOutPut:{}", tpiID, decodeOutPut); - long incr; + long incr = 0; String incrKey = String.format("evaluationResult:%s", tpiID); if (matchOutPut(decodeOutPut) && (incr = redisUtil.increment(incrKey)) > 3) { log.info("evaluationResult, tpiID:{},第{}次评测失败,需要发送钉钉通知", tpiID, incr); @@ -64,8 +64,9 @@ public class CallbackController { // 通知之后清空 redisUtil.remove(incrKey); return RESULT; + } else if(incr == 0L){ + log.info("tpiID:{},评测通过", tpiID); } - log.info("tpiID:{},评测通过", tpiID); return RESULT; }