From 69fb8bf0f96b60c98ef6e6903f7f9fd7489371cb Mon Sep 17 00:00:00 2001 From: Himit_ZH <372347736@qq.com> Date: Sun, 28 Nov 2021 14:18:39 +0800 Subject: [PATCH] fix bug --- .../top/hcode/hoj/controller/admin/AdminJudgeController.java | 5 ++--- .../java/top/hcode/hoj/controller/oj/JudgeController.java | 2 +- .../top/hcode/hoj/remoteJudge/task/Impl/CodeForcesJudge.java | 4 ++-- .../src/main/java/top/hcode/hoj/pojo/entity/judge/Judge.java | 1 - 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminJudgeController.java b/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminJudgeController.java index d41dc790..41f70d2f 100644 --- a/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminJudgeController.java +++ b/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminJudgeController.java @@ -105,7 +105,7 @@ public class AdminJudgeController { // 设置默认值 judge.setStatus(Constants.Judge.STATUS_PENDING.getStatus()); // 开始进入判题队列 judge.setVersion(judge.getVersion() + 1); - judge.setJudger(null) + judge.setJudger("") .setTime(null) .setMemory(null) .setErrorMessage(null) @@ -152,12 +152,11 @@ public class AdminJudgeController { idMapStatus.put(judge.getSubmitId(), judge.getStatus()); judge.setStatus(Constants.Judge.STATUS_PENDING.getStatus()); // 开始进入判题队列 judge.setVersion(judge.getVersion() + 1); - judge.setJudger(null) + judge.setJudger("") .setTime(null) .setMemory(null) .setErrorMessage(null) .setOiRankScore(null) - .setJudger(null) .setScore(null); submitIdList.add(judge.getSubmitId()); } diff --git a/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/JudgeController.java b/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/JudgeController.java index 8dc5b165..9185dcc4 100644 --- a/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/JudgeController.java +++ b/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/oj/JudgeController.java @@ -232,7 +232,7 @@ public class JudgeController { .setOiRankScore(null) .setScore(null) .setTime(null) - .setJudger(null) + .setJudger("") .setMemory(null); judgeService.updateById(judge); diff --git a/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/task/Impl/CodeForcesJudge.java b/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/task/Impl/CodeForcesJudge.java index b9dd211b..8ff08dab 100644 --- a/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/task/Impl/CodeForcesJudge.java +++ b/hoj-springboot/JudgeServer/src/main/java/top/hcode/hoj/remoteJudge/task/Impl/CodeForcesJudge.java @@ -233,7 +233,7 @@ public class CodeForcesJudge implements RemoteJudgeStrategy { String csrfToken = getCsrfToken(getSubmitUrl(contestId)); HashMap paramMap = new HashMap<>(); paramMap.put("csrf_token", csrfToken); - paramMap.put("_tta", 594); + paramMap.put("_tta", 140); paramMap.put("bfaa", "f1b3f18c715565b589b7823cda7448ce"); paramMap.put("ftaa", ""); paramMap.put("action", "submitSolutionFormSubmitted"); @@ -258,7 +258,7 @@ public class CodeForcesJudge implements RemoteJudgeStrategy { String log = String.format("Codeforces[%s] [%s]:Failed to submit code, caused by `Source Code Error`", contestId, problemID); throw new RuntimeException(log); } - String log = String.format("Codeforces[%s] [%s]:Failed to submit code, caused by `Unknown`", contestId, problemID); + String log = String.format("Codeforces[%s] [%s]:Failed to submit code, caused by `%s`", contestId, problemID,response.body()); throw new RuntimeException(log); } } diff --git a/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/judge/Judge.java b/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/judge/Judge.java index 9af62cd8..59666cee 100644 --- a/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/judge/Judge.java +++ b/hoj-springboot/api/src/main/java/top/hcode/hoj/pojo/entity/judge/Judge.java @@ -85,7 +85,6 @@ public class Judge implements Serializable { @ApiModelProperty(value = "训练id,非训练提交默认为null") private Long tid; - @TableField(updateStrategy = FieldStrategy.IGNORED) @ApiModelProperty(value = "判题机名称") private String judger;