| | |
| | | |
| | | @Override |
| | | public YwBuilding findById(Integer id) { |
| | | |
| | | |
| | | MPJLambdaWrapper<YwBuilding> queryWrapper = new MPJLambdaWrapper<>(); |
| | | queryWrapper.selectAll(YwBuilding.class ) |
| | | .selectAs(YwProject::getName,YwBuilding::getProjectName) |
| | | .select(" (select ifnull(sum(y.FEE_AREA),0) from yw_room y where y.ISDELETED = 0 and y.status = 0 and y.IS_INVESTMENT = 1 and y.BUILDING_ID = t.id ) ",YwBuilding::getRoomFeeArea) |
| | | .select(" (select ifnull(sum(y.RENT_AREA),0) from yw_room y where y.ISDELETED = 0 and y.status = 0 and y.IS_INVESTMENT = 1 and y.BUILDING_ID = t.id ) ",YwBuilding::getRoomRentArea) |
| | | .select("",YwBuilding::getRoomFeeArea) |
| | | .leftJoin(YwProject.class,YwProject::getId,YwBuilding::getProjectId) |
| | | .eq(YwBuilding::getId,id) |
| | | .last(" limit 1 ") |