傅行帆 пре 5 година
родитељ
комит
2c908314e1

+ 5
- 3
src/main/java/com/huiju/estateagents/service/impl/TaPreselectionRecordServiceImpl.java Прегледај датотеку

114
             TaHousingResources housingResources = taHousingResourcesService.getOne(housingQueryWrapper);
114
             TaHousingResources housingResources = taHousingResourcesService.getOne(housingQueryWrapper);
115
             //户型图name
115
             //户型图name
116
             TaBuildingApartment buildingApartment = taBuildingApartmentService.getById(housingResources.getApartmentId());
116
             TaBuildingApartment buildingApartment = taBuildingApartmentService.getById(housingResources.getApartmentId());
117
-            housingResources.setApartmentName(buildingApartment.getApartmentName());
118
-            housingResources.setBuildingArea(buildingApartment.getBuildingArea());
119
-            housingResources.setInsideArea(buildingApartment.getInsideArea());
117
+            if (null != buildingApartment){
118
+                housingResources.setApartmentName(buildingApartment.getApartmentName());
119
+                housingResources.setBuildingArea(buildingApartment.getBuildingArea());
120
+                housingResources.setInsideArea(buildingApartment.getInsideArea());
121
+            }
120
             record.setHousingInfo(housingResources);
122
             record.setHousingInfo(housingResources);
121
         });
123
         });
122
 
124