Page<FwSjJbEntity> page1 = new Page<>(page,pageSize); LambdaQueryWrapper<FwSjJbEntity> queryWrapper = new LambdaQueryWrapper<>(); Page<FwSjJbEntity> jbEntityPage = new Page<FwSjJbEntity>(); if(name==null||name.equals("")){ jbEntityPage = this.page(page1); }else { queryWrapper.like(FwSjJbEntity::getHouseName,name); jbEntityPage = this.page(page1, queryWrapper); } List<FwSjJbEntity> records = jbEntityPage.getRecords(); List<FwSjJbEntity> collect = records.stream().map(o -> { o.setSource(Const.FANGYUAN_LAIYUAN.get(o.getSource())); return o; }).collect(Collectors.toList()); jbEntityPage.setRecords(collect);
标签:queryWrapper,遍历,Java,Page,jbEntityPage,new,page,page1 From: https://www.cnblogs.com/Fooo/p/17920188.html