Przeglądaj źródła

Merge branch 'bug-branch' of chchen/exercise into master

 增加打印日志
chchen 5 lat temu
rodzic
commit
4a9c467cf7

+ 2 - 2
ssj-mybatis-service-impl/src/main/java/com/ssj/service/mapper/KmtExerciseMapper.java

@@ -1154,11 +1154,11 @@ public interface KmtExerciseMapper {
                                 @Param("questionImage") String questionImage,
                                 @Param("answerImage") String answerImage);
 
-    @Select("select * from kmt_exercise_questions where book_id=#{bookId} and num > #{num} order by num limit 1")
+    @Select("select * from kmt_exercise_questions where book_id=#{bookId} and num >= #{num} order by num limit 1")
     KmtExerciseQuestion findNextByBookIdAndNum (@Param("bookId") String bookId,
                                             @Param("num") int num);
 
-    @Select("select * from kmt_exercise_questions where book_id=#{bookId} and num < #{num} order by num desc limit 1")
+    @Select("select * from kmt_exercise_questions where book_id=#{bookId} and num <= #{num} order by num desc limit 1")
     KmtExerciseQuestion findPreviousByBookIdAndNum (@Param("bookId") String bookId,
                                             @Param("num") int num);