diff --git a/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminContestController.java b/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminContestController.java index ba82112f..d50f14ff 100644 --- a/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminContestController.java +++ b/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/AdminContestController.java @@ -225,7 +225,11 @@ public class AdminContestController { QueryWrapper problemQueryWrapper = new QueryWrapper<>(); if (problemType != null) { // 必备条件 隐藏的不可取来做比赛题目 - problemQueryWrapper.eq("type", problemType).ne("auth", 2); + problemQueryWrapper + // vj题目不限制赛制 + .and(wrapper->wrapper.eq("type", problemType) + .or().eq("is_remote", true)) + .ne("auth", 2); } // 逻辑判断,如果是查询已有的就应该是in,如果是查询不要重复的,使用not in diff --git a/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/FileController.java b/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/FileController.java index 636321f5..0d129fd0 100644 --- a/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/FileController.java +++ b/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/controller/admin/FileController.java @@ -279,7 +279,6 @@ public class FileController { } Assert.isTrue(hasTestCase, "对不起,该题目的评测数据为空!"); - workDir = Constants.File.FILE_DOWNLOAD_TMP_FOLDER.getPath() + File.separator + IdUtil.simpleUUID(); FileUtil.mkdir(workDir); // 写入本地 for (int i = 0; i < problemCaseList.size(); i++) { @@ -340,7 +339,6 @@ public class FileController { e.printStackTrace(); } // 清空临时文件 - FileUtil.del(workDir); FileUtil.del(Constants.File.FILE_DOWNLOAD_TMP_FOLDER.getPath() + File.separator + fileName); } } diff --git a/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/xml/ContestMapper.xml b/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/xml/ContestMapper.xml index 7bab0941..93a8c4a0 100644 --- a/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/xml/ContestMapper.xml +++ b/hoj-springboot/DataBackup/src/main/java/top/hcode/hoj/dao/xml/ContestMapper.xml @@ -16,7 +16,7 @@ and c.type = #{type} - order by c.start_time DESC,c.id DESC + order by c.status ASC, c.start_time DESC