|
@@ -93,6 +93,34 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
|
93
|
93
|
return response;
|
94
|
94
|
}
|
95
|
95
|
|
|
96
|
+ @Override
|
|
97
|
+ public ResponseBean buildingAllSelectId(String id) {
|
|
98
|
+ ResponseBean response= new ResponseBean();
|
|
99
|
+ QueryWrapper<Building> buildingtWrapper = new QueryWrapper<>();
|
|
100
|
+ buildingtWrapper.lambda().gt(Building::getStatus,-1);
|
|
101
|
+ buildingtWrapper.lambda().eq(Building::getBuildingId,id);
|
|
102
|
+ Building building= buildingMapper.selectOne(buildingtWrapper);
|
|
103
|
+ //查询当前图片
|
|
104
|
+ QueryWrapper<BuildingImg> BuildingImgQueryWrapper = new QueryWrapper<>();
|
|
105
|
+ BuildingImgQueryWrapper.eq("building_id", id);
|
|
106
|
+ BuildingImgQueryWrapper.eq("img_type", "banner");
|
|
107
|
+ List<BuildingImg> buildingImg= buildingImgMapper.selectList(BuildingImgQueryWrapper);
|
|
108
|
+ building.setBuildingImg(buildingImg);
|
|
109
|
+ // 查询户型
|
|
110
|
+ QueryWrapper<BuildingApartment> AppointmentQueryWrapper = new QueryWrapper<>();
|
|
111
|
+ AppointmentQueryWrapper.eq("building_id", id);
|
|
112
|
+ AppointmentQueryWrapper.eq("status", 1);
|
|
113
|
+ List<BuildingApartment> appoint= buildingApartmentMapper.selectList(AppointmentQueryWrapper);
|
|
114
|
+
|
|
115
|
+ for (BuildingApartment apar:appoint) {
|
|
116
|
+ List<BuildingImg> imgs = buildingImgMapper.getBuildingImgByApartment(apar.getApartmentId());
|
|
117
|
+ apar.setBuildingImgList(imgs);
|
|
118
|
+ }
|
|
119
|
+ building.setBuildingApartment(appoint);
|
|
120
|
+ response.addSuccess(building);
|
|
121
|
+ return response;
|
|
122
|
+ }
|
|
123
|
+
|
96
|
124
|
@Override
|
97
|
125
|
public ResponseBean buildingUpdate(String parameter) {
|
98
|
126
|
ResponseBean response= new ResponseBean();
|