From 6cf74c28a177fc1f8bcf5d777c17605e57e5785d Mon Sep 17 00:00:00 2001 From: tamguo Date: Tue, 7 Aug 2018 11:11:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/tamguo/web/tiku/QuestionContrller.java | 4 +++- tamguo-tms/src/main/resources/templates/questionList.html | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) 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 @@