|
@@ -153,11 +153,13 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
|
153
|
153
|
|
154
|
154
|
JSONObject object= JSONObject.parseObject(parameter);
|
155
|
155
|
|
|
156
|
+ Building building = JSONObject.parseObject(parameter,Building.class);
|
156
|
157
|
String imgStr = object.getString("img");
|
157
|
158
|
List<BuildingImg> buildingImgs = JSONObject.parseArray(imgStr, BuildingImg.class);
|
158
|
159
|
for (BuildingImg img:buildingImgs){
|
159
|
160
|
BuildingImg Images = new BuildingImg();
|
160
|
|
- Images.setBuildingId(idGen.nextId()+"");
|
|
161
|
+ Images.setImgId(idGen.nextId()+"");
|
|
162
|
+ Images.setBuildingId(building.getBuildingId());
|
161
|
163
|
Images.setImgType(img.getImgType());
|
162
|
164
|
Images.setUrl(img.getUrl());
|
163
|
165
|
Images.setOrderNo(Integer.valueOf(img.getOrderNo()));
|
|
@@ -165,7 +167,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
|
165
|
167
|
Images.setCreateDate(LocalDateTime.now());
|
166
|
168
|
buildingImgMapper.insert(Images);
|
167
|
169
|
}
|
168
|
|
- Building building = JSONObject.parseObject(parameter,Building.class);
|
|
170
|
+
|
169
|
171
|
// if (!"".equals(building.getBuildingId())&&null!=building.getBuildingId()){
|
170
|
172
|
// response.addError("楼盘名称不能为空");
|
171
|
173
|
// return response;
|