|
@@ -3,6 +3,7 @@ package com.huiju.estateagents.service.impl;
|
3
|
3
|
import com.alibaba.fastjson.JSONArray;
|
4
|
4
|
import com.alibaba.fastjson.JSONObject;
|
5
|
5
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
6
|
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
6
|
7
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
7
|
8
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
8
|
9
|
import com.huiju.estateagents.base.ResponseBean;
|
|
@@ -250,6 +251,12 @@ public class TaBuildingServiceImpl extends ServiceImpl<TaBuildingMapper, TaBuild
|
250
|
251
|
|
251
|
252
|
TaBuilding building = JSONObject.parseObject(parameter,TaBuilding.class);
|
252
|
253
|
|
|
254
|
+ // 先删除视频
|
|
255
|
+ UpdateWrapper<TaBuilding> updateWrapper = new UpdateWrapper<>();
|
|
256
|
+ updateWrapper.eq("building_id", building.getBuildingId());
|
|
257
|
+ updateWrapper.set("video_url", null);
|
|
258
|
+ this.update(updateWrapper);
|
|
259
|
+
|
253
|
260
|
//图片先删除再添加
|
254
|
261
|
String imgStr = object.getString("img");
|
255
|
262
|
List<TaBuildingImg> buildingImgs = JSONObject.parseArray(imgStr, TaBuildingImg.class);
|