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; }