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);