|
@@ -7,10 +7,12 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
7
|
7
|
import com.huiju.estateagents.base.ResponseBean;
|
8
|
8
|
import com.huiju.estateagents.common.CommConstant;
|
9
|
9
|
import com.huiju.estateagents.common.DateUtils;
|
|
10
|
+import com.huiju.estateagents.common.StringUtils;
|
10
|
11
|
import com.huiju.estateagents.entity.*;
|
11
|
12
|
import com.huiju.estateagents.mapper.*;
|
12
|
13
|
import com.huiju.estateagents.service.ITaBuildingService;
|
13
|
14
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
15
|
+import org.checkerframework.checker.units.qual.A;
|
14
|
16
|
import org.springframework.beans.factory.annotation.Autowired;
|
15
|
17
|
import org.springframework.stereotype.Service;
|
16
|
18
|
|
|
@@ -57,6 +59,9 @@ public class TaBuildingServiceImpl extends ServiceImpl<TaBuildingMapper, TaBuild
|
57
|
59
|
@Autowired
|
58
|
60
|
TaPersonMapper taPersonMapper;
|
59
|
61
|
|
|
62
|
+ @Autowired
|
|
63
|
+ TdCityMapper tdCityMapper;
|
|
64
|
+
|
60
|
65
|
|
61
|
66
|
@Override
|
62
|
67
|
public ResponseBean buildingList(Integer pageNum, Integer pageSize, String name, String code) {
|
|
@@ -162,7 +167,11 @@ public class TaBuildingServiceImpl extends ServiceImpl<TaBuildingMapper, TaBuild
|
162
|
167
|
BuildingTagQueryWrapper.eq("building_id", building.getBuildingId());
|
163
|
168
|
taBuildingTagMapper.delete(BuildingTagQueryWrapper);
|
164
|
169
|
insertTagBatch(buildingTags, building.getBuildingId());
|
165
|
|
-
|
|
170
|
+ if(null != building.getCityId()){
|
|
171
|
+ TdCity city = tdCityMapper.selectById(building.getCityId());
|
|
172
|
+ city.setStatus("1");
|
|
173
|
+ tdCityMapper.updateById(city);
|
|
174
|
+ }
|
166
|
175
|
return ResponseBean.success("");
|
167
|
176
|
}
|
168
|
177
|
|
|
@@ -182,6 +191,11 @@ public class TaBuildingServiceImpl extends ServiceImpl<TaBuildingMapper, TaBuild
|
182
|
191
|
if (taBuildingMapper.insert(building) < 1) {
|
183
|
192
|
return ResponseBean.error("添加项目楼栋失败", ResponseBean.ERROR_UNAVAILABLE);
|
184
|
193
|
}
|
|
194
|
+ if(null != building.getCityId()){
|
|
195
|
+ TdCity city = tdCityMapper.selectById(building.getCityId());
|
|
196
|
+ city.setStatus("1");
|
|
197
|
+ tdCityMapper.updateById(city);
|
|
198
|
+ }
|
185
|
199
|
|
186
|
200
|
String imgStr = object.getString("img");
|
187
|
201
|
List<TaBuildingImg> buildingImgs = JSONObject.parseArray(imgStr, TaBuildingImg.class);
|