Quellcode durchsuchen

创建时间倒序

lyhzzz vor 2 Jahren
Ursprung
Commit
e3f3987351
1 geänderte Dateien mit 12 neuen und 12 gelöschten Zeilen
  1. 12 12
      src/main/java/com/fdkankan/tk/service/impl/RoomServiceImpl.java

+ 12 - 12
src/main/java/com/fdkankan/tk/service/impl/RoomServiceImpl.java

@@ -77,21 +77,21 @@ public class RoomServiceImpl extends ServiceImpl<IRoomMapper, Room> implements I
         if (StringUtils.isNotBlank(param.getRoomTitle()) ) {
             wrapper.like(Room::getRoomTitle,param.getRoomTitle());
         }
-        wrapper.orderByDesc(Room::getLastLookTime);
+        //wrapper.orderByDesc(Room::getLastLookTime);
         wrapper.orderByDesc(Room::getCreateTime);
 
         Page<Room> page = this.page(new Page<>(param.getPageNum(), param.getPageSize()), wrapper);
-        List<Room> closeRoomList = new ArrayList<>();
-        List<Room> openRoomList = new ArrayList<>();
-        for (Room record : page.getRecords()) {
-            if(record.getRoomStatus() == 2){
-                closeRoomList.add(record);
-            }else {
-                openRoomList.add(record);
-            }
-        }
-        openRoomList.addAll(closeRoomList);
-        page.setRecords(openRoomList);
+//        List<Room> closeRoomList = new ArrayList<>();
+//        List<Room> openRoomList = new ArrayList<>();
+//        for (Room record : page.getRecords()) {
+//            if(record.getRoomStatus() == 2){
+//                closeRoomList.add(record);
+//            }else {
+//                openRoomList.add(record);
+//            }
+//        }
+//        openRoomList.addAll(closeRoomList);
+//        page.setRecords(openRoomList);
         return PageInfo.PageInfo(page);
     }