فهرست منبع

Merge branch 'dev'

yangdamao 1 روز پیش
والد
کامیت
63f73bd340

+ 1 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/service/impl/QuestionServiceImpl.java

@@ -5028,7 +5028,7 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
         examQuestion.setQuestionId(questionId);
         //获取最新排序
         Integer sort = 0;
-        ExamQuestion one = iExamQuestionService.getOne(new LambdaUpdateWrapper<ExamQuestion>().eq(ExamQuestion::getExamId, examId).orderByDesc(ExamQuestion::getSort));
+        ExamQuestion one = iExamQuestionService.getOne(new LambdaUpdateWrapper<ExamQuestion>().eq(ExamQuestion::getExamId, examId).orderByDesc(ExamQuestion::getSort).last("limit 1"));
         if (ObjectUtils.isNotNull(one)){
             sort = one.getSort() +1;
         }