Browse Source

fix:修复通知的排序时间

pre-production
pref_mail@163.com 3 days ago
parent
commit
62be90970f
  1. 5
      blade-service/logpm-basic/src/main/java/com/logpm/basic/controller/BasicNoticeController.java

5
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<BasicNoticeVO>> list() {
List<BasicNotice> list = noticeService.list();
LambdaQueryWrapper<BasicNotice> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.orderByDesc(BasicNotice::getReleaseTime);
List<BasicNotice> list = noticeService.list(lambdaQueryWrapper);
List<BasicNoticeVO> data = new ArrayList<>();
for (BasicNotice notice : list) {
BasicNoticeVO vo = BasicNoticeWrapper.build().entityVO(notice);

Loading…
Cancel
Save