|
@@ -76,12 +76,21 @@ public class RoomServiceImpl extends ServiceImpl<IRoomMapper, Room> implements I
|
|
|
if (StringUtils.isNotBlank(param.getRoomTitle()) ) {
|
|
|
wrapper.like(Room::getRoomTitle,param.getRoomTitle());
|
|
|
}
|
|
|
- wrapper.orderByAsc(Room::getRoomStatus);
|
|
|
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);
|
|
|
return PageInfo.PageInfo(page);
|
|
|
}
|
|
|
|
|
@@ -216,7 +225,7 @@ public class RoomServiceImpl extends ServiceImpl<IRoomMapper, Room> implements I
|
|
|
}
|
|
|
if(type == 0 ){
|
|
|
room.setLastLookTime(DateUtil.formatDateTime(new Date()));
|
|
|
- room.setRoomStatus(0);
|
|
|
+ room.setRoomStatus(1);
|
|
|
}
|
|
|
if(type == 1 ){
|
|
|
room.setLastLookTime(DateUtil.formatDateTime(new Date()));
|