diff --git a/tamguo-tms/src/main/java/com/tamguo/web/tiku/QuestionContrller.java b/tamguo-tms/src/main/java/com/tamguo/web/tiku/QuestionContrller.java index 437d6ce..002d79c 100644 --- a/tamguo-tms/src/main/java/com/tamguo/web/tiku/QuestionContrller.java +++ b/tamguo-tms/src/main/java/com/tamguo/web/tiku/QuestionContrller.java @@ -1,5 +1,7 @@ package com.tamguo.web.tiku; +import java.util.Arrays; + import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.PathVariable; @@ -48,7 +50,7 @@ public class QuestionContrller { Page page = new Page<>(); page.setCurrent(offset); page.setSize(limit); - Page questionList = iQuestionService.selectPage(page , Condition.create().eq("chapter_id", chapterId)); + Page questionList = iQuestionService.selectPage(page , Condition.create().eq("chapter_id", chapterId).orderDesc(Arrays.asList("id"))); model.addObject("subject", subject); model.addObject("course", course); model.addObject("chapter", chapter); diff --git a/tamguo-tms/src/main/resources/templates/questionList.html b/tamguo-tms/src/main/resources/templates/questionList.html index f8bea41..8ad4d1b 100644 --- a/tamguo-tms/src/main/resources/templates/questionList.html +++ b/tamguo-tms/src/main/resources/templates/questionList.html @@ -25,7 +25,7 @@