From 808a95c9f14680928daff28ba102f3cec8b8ca1b Mon Sep 17 00:00:00 2001 From: Himit_ZH <372347736@qq.com> Date: Mon, 9 Aug 2021 02:35:18 +0800 Subject: [PATCH] fix compling --- .../top/hcode/hoj/remoteJudge/RemoteJudgeGetResult.java | 8 ++++---- .../top/hcode/hoj/remoteJudge/RemoteJudgeToSubmit.java | 5 ++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/RemoteJudgeGetResult.java b/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/RemoteJudgeGetResult.java index b9eb5974..b6851853 100644 --- a/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/RemoteJudgeGetResult.java +++ b/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/RemoteJudgeGetResult.java @@ -68,7 +68,8 @@ public class RemoteJudgeGetResult { Map result = remoteJudgeStrategy.result(resultSubmitId, username, password, cookies); Integer status = (Integer) result.getOrDefault("status", Constants.Judge.STATUS_SYSTEM_ERROR.getStatus()); if (status.intValue() != Constants.Judge.STATUS_PENDING.getStatus() && - status.intValue() != Constants.Judge.STATUS_JUDGING.getStatus()) { + status.intValue() != Constants.Judge.STATUS_JUDGING.getStatus() && + status.intValue() != Constants.Judge.STATUS_COMPILING.getStatus()) { // 由于POJ特殊 之前获取提交ID未释放账号,所以在此需要将账号变为可用 changeAccountStatus(remoteJudge, username, password); @@ -124,9 +125,8 @@ public class RemoteJudgeGetResult { } public void changeAccountStatus(String remoteJudge, String username, String password) { - // 由于POJ和HDU特殊 之前获取提交ID未释放账号,所以在此需要将账号变为可用 - if (remoteJudge.equals(Constants.RemoteJudge.POJ_JUDGE.getName()) - || remoteJudge.equals(Constants.RemoteJudge.HDU_JUDGE.getName())) { + // 由于POJ特殊 之前获取提交ID未释放账号,所以在此需要将账号变为可用 + if (remoteJudge.equals(Constants.RemoteJudge.POJ_JUDGE.getName())) { UpdateWrapper remoteJudgeAccountUpdateWrapper = new UpdateWrapper<>(); remoteJudgeAccountUpdateWrapper.set("status", true) .eq("oj", remoteJudge) diff --git a/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/RemoteJudgeToSubmit.java b/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/RemoteJudgeToSubmit.java index 184e33cd..2f93d838 100644 --- a/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/RemoteJudgeToSubmit.java +++ b/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/RemoteJudgeToSubmit.java @@ -85,9 +85,8 @@ public class RemoteJudgeToSubmit { log.error("网络错误---------------->获取不到提交ID"); return; }else { - // 对POJ和POJ特殊 需要一直保持提交和获取结果时账号唯一,所以需要特别过滤 - if (!remoteJudge.equals(Constants.RemoteJudge.POJ_JUDGE.getName())&& - !remoteJudge.equals(Constants.RemoteJudge.HDU_JUDGE.getName())) { + // 对POJ特殊 需要一直保持提交和获取结果时账号唯一,所以需要特别过滤 + if (!remoteJudge.equals(Constants.RemoteJudge.POJ_JUDGE.getName())) { UpdateWrapper remoteJudgeAccountUpdateWrapper = new UpdateWrapper<>(); remoteJudgeAccountUpdateWrapper.set("status", true) .eq("oj", remoteJudge)