|
@@ -134,10 +134,11 @@ public class TaBuildingServiceImpl extends ServiceImpl<TaBuildingMapper, TaBuild
|
134
|
134
|
*/
|
135
|
135
|
private List<TaBuildingImg> getBuildingImg(String buildingId, String imgType) {
|
136
|
136
|
//查询当前图片
|
137
|
|
- QueryWrapper<TaBuildingImg> BuildingImgQueryWrapper = new QueryWrapper<>();
|
138
|
|
- BuildingImgQueryWrapper.eq("building_id", buildingId);
|
139
|
|
- BuildingImgQueryWrapper.eq("img_type", imgType);
|
140
|
|
- List<TaBuildingImg> buildingImg = taBuildingImgMapper.selectList(BuildingImgQueryWrapper);
|
|
137
|
+ QueryWrapper<TaBuildingImg> buildingImgQueryWrapper = new QueryWrapper<>();
|
|
138
|
+ buildingImgQueryWrapper.eq("building_id", buildingId);
|
|
139
|
+ buildingImgQueryWrapper.eq("img_type", imgType);
|
|
140
|
+ buildingImgQueryWrapper.orderByAsc("order_no");
|
|
141
|
+ List<TaBuildingImg> buildingImg = taBuildingImgMapper.selectList(buildingImgQueryWrapper);
|
141
|
142
|
return buildingImg.size() > 0 ? buildingImg : null;
|
142
|
143
|
}
|
143
|
144
|
|
|
@@ -406,7 +407,7 @@ public class TaBuildingServiceImpl extends ServiceImpl<TaBuildingMapper, TaBuild
|
406
|
407
|
|
407
|
408
|
// 视频封面图
|
408
|
409
|
String videoImage = object.getString("videoImage");
|
409
|
|
- List<TaBuildingImg> videoImageList = JSONObject.parseArray(imgStr, TaBuildingImg.class);
|
|
410
|
+ List<TaBuildingImg> videoImageList = JSONObject.parseArray(videoImage, TaBuildingImg.class);
|
410
|
411
|
if (CollectionUtils.isNotEmpty(videoImageList)) {
|
411
|
412
|
videoImageList = insertImgBatch(videoImageList, building.getBuildingId());
|
412
|
413
|
}
|
|
@@ -748,14 +749,13 @@ public class TaBuildingServiceImpl extends ServiceImpl<TaBuildingMapper, TaBuild
|
748
|
749
|
buildingApartmentQueryWrapper.eq("apartment_id", id);
|
749
|
750
|
TaBuildingApartment buildingApartment = taBuildingApartmentMapper.selectOne(buildingApartmentQueryWrapper);
|
750
|
751
|
|
751
|
|
- TaBuilding building= new TaBuilding();
|
|
752
|
+// TaBuilding building= new TaBuilding();
|
752
|
753
|
QueryWrapper<TaBuilding> buildingtWrapper = new QueryWrapper<>();
|
753
|
754
|
buildingtWrapper.lambda().eq(TaBuilding::getBuildingId,buildingApartment.getBuildingId());
|
754
|
|
- TaBuilding bui= taBuildingMapper.selectOne(buildingtWrapper);
|
755
|
|
-
|
756
|
|
- if (bui.getStatus().equals(1)){
|
757
|
|
- return ResponseBean.error("楼盘已发布不可以删除", ResponseBean.ERROR_UNAVAILABLE);
|
758
|
|
- }
|
|
755
|
+// TaBuilding bui= taBuildingMapper.selectOne(buildingtWrapper);
|
|
756
|
+// if (bui.getStatus().equals(1)){
|
|
757
|
+// return ResponseBean.error("楼盘已发布不可以删除", ResponseBean.ERROR_UNAVAILABLE);
|
|
758
|
+// }
|
759
|
759
|
|
760
|
760
|
buildingApartment.setStatus(-1);
|
761
|
761
|
taBuildingApartmentMapper.update(buildingApartment,buildingApartmentQueryWrapper);
|