赞
踩
- PageHelper.startPage(meetingRoomQuery.getPageNum(), meetingRoomQuery.getPageSize());
- LambdaQueryWrapper<MeetingRoomDO> wrapper = new QueryWrapper<MeetingRoomDO>().lambda();
- wrapper.like(ObjectUtil.isNotEmpty(meetingRoomQuery.getName()),MeetingRoomDO::getName,meetingRoomQuery.getName());
- wrapper.eq(ObjectUtil.isNotEmpty(meetingRoomQuery.getStatus()),MeetingRoomDO::getStatus,meetingRoomQuery.getStatus());
- wrapper.eq(ObjectUtil.isNotEmpty(meetingRoomQuery.getIsDeleted()),MeetingRoomDO::getIsDeleted,DeletedFlagEnum.UNDELETE_0.getIsDeleted());
- wrapper.orderByDesc(MeetingRoomDO::getCreatedAt);
- if(ObjectUtil.isNotEmpty(meetingRoomQuery.getFloorIds())){
- List<String> floorId=Arrays.asList(meetingRoomQuery.getFloorIds().split(","));
- wrapper.and(obj->{
- floorId.stream().filter(v->ObjectUtil.isNotEmpty(v)).collect(Collectors.toList()).forEach(s->{
- obj.or(s1->{
- s1.like(MeetingRoomDO::getAddress,s);
- });
- });
- });
- }
- List<MeetingRoomDO> list=this.list(wrapper);
- PageUtils page = PageTransformUtil.transform(list);
- //if(ObjectUtil.isEmpty(list)) return null;
- List<MeetingRoom> meetingRoomList=meetingRoomCover.toDTO(page.getList());
- page.setList(meetingRoomList);
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。