From 62be90970f2b5a4e78381ec211d0892f2494922a Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" Date: Thu, 16 Jan 2025 09:37:37 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E7=9A=84=E6=8E=92=E5=BA=8F=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/logpm/basic/controller/BasicNoticeController.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/blade-service/logpm-basic/src/main/java/com/logpm/basic/controller/BasicNoticeController.java b/blade-service/logpm-basic/src/main/java/com/logpm/basic/controller/BasicNoticeController.java index c91042af4..b6c0a72d9 100644 --- a/blade-service/logpm-basic/src/main/java/com/logpm/basic/controller/BasicNoticeController.java +++ b/blade-service/logpm-basic/src/main/java/com/logpm/basic/controller/BasicNoticeController.java @@ -16,6 +16,7 @@ */ package com.logpm.basic.controller; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.logpm.basic.entity.BasicNotice; @@ -95,7 +96,9 @@ public class BasicNoticeController extends BladeController { @ApiOperationSupport(order = 2) @ApiOperation(value = "分页", notes = "传入notice") public R> list() { - List list = noticeService.list(); + LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); + lambdaQueryWrapper.orderByDesc(BasicNotice::getReleaseTime); + List list = noticeService.list(lambdaQueryWrapper); List data = new ArrayList<>(); for (BasicNotice notice : list) { BasicNoticeVO vo = BasicNoticeWrapper.build().entityVO(notice);