diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/PaperManager.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/PaperManager.java index 16ec36a..5b12040 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/PaperManager.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/PaperManager.java @@ -290,7 +290,7 @@ public class PaperManager { //回答列表 QueryWrapper wrapper = new QueryWrapper<>(); wrapper.lambda().eq(ElQuAnswer::getQuId, item.getQuId()); - wrapper.last(" ORDER BY RAND() "); + wrapper.last(" ORDER BY RANDOM() "); List answerList = quAnswerService.list(wrapper); if (CollUtil.isNotEmpty(answerList)) { int ii = 0; diff --git a/ruoyi-system/src/main/resources/mapper/system/ElQuMapper.xml b/ruoyi-system/src/main/resources/mapper/system/ElQuMapper.xml index 5758648..aab4e6c 100644 --- a/ruoyi-system/src/main/resources/mapper/system/ElQuMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/ElQuMapper.xml @@ -51,7 +51,7 @@ AND a.id NOT IN '${item}' - ORDER BY RAND() + ORDER BY RANDOM() LIMIT ${size}