|
@@ -80,12 +80,13 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
|
80
|
80
|
public ResponseBean buildingSelectId(String id) {
|
81
|
81
|
ResponseBean response= new ResponseBean();
|
82
|
82
|
QueryWrapper<Building> buildingtWrapper = new QueryWrapper<>();
|
83
|
|
- buildingtWrapper.lambda().eq(Building::getStatus,0);
|
|
83
|
+ buildingtWrapper.lambda().eq(Building::getStatus,1);
|
84
|
84
|
buildingtWrapper.lambda().eq(Building::getBuildingId,id);
|
85
|
85
|
Building building= buildingMapper.selectOne(buildingtWrapper);
|
86
|
86
|
//查询当前图片
|
87
|
87
|
QueryWrapper<BuildingImg> BuildingImgQueryWrapper = new QueryWrapper<>();
|
88
|
|
- BuildingImgQueryWrapper.eq("building_id", building.getBuildingId());
|
|
88
|
+ BuildingImgQueryWrapper.eq("building_id", id);
|
|
89
|
+ BuildingImgQueryWrapper.eq("img_type", "banner");
|
89
|
90
|
List<BuildingImg> buildingImg= buildingImgMapper.selectList(BuildingImgQueryWrapper);
|
90
|
91
|
building.setBuildingImg(buildingImg);
|
91
|
92
|
response.addSuccess(building);
|
|
@@ -108,6 +109,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
|
108
|
109
|
//图片先删除再添加
|
109
|
110
|
QueryWrapper<BuildingImg> BuildingImgQueryWrapper = new QueryWrapper<>();
|
110
|
111
|
BuildingImgQueryWrapper.eq("building_id", building.getBuildingId());
|
|
112
|
+ BuildingImgQueryWrapper.eq("img_type", "banner");
|
111
|
113
|
buildingImgMapper.delete(BuildingImgQueryWrapper);
|
112
|
114
|
|
113
|
115
|
for (BuildingImg img:buildingImgs){
|