|
@@ -63,6 +63,9 @@ public class TaBuildingServiceImpl extends ServiceImpl<TaBuildingMapper, TaBuild
|
63
|
63
|
@Autowired
|
64
|
64
|
TaPersonMapper taPersonMapper;
|
65
|
65
|
|
|
66
|
+ @Autowired
|
|
67
|
+ TaUserMapper taUserMapper;
|
|
68
|
+
|
66
|
69
|
@Autowired
|
67
|
70
|
TdCityMapper tdCityMapper;
|
68
|
71
|
|
|
@@ -111,6 +114,9 @@ public class TaBuildingServiceImpl extends ServiceImpl<TaBuildingMapper, TaBuild
|
111
|
114
|
@Autowired
|
112
|
115
|
private ITaSalesBatchService iTaSalesBatchService;
|
113
|
116
|
|
|
117
|
+ @Autowired
|
|
118
|
+ private TaPersonBuildingMapper taPersonBuildingMapper;
|
|
119
|
+
|
114
|
120
|
@Override
|
115
|
121
|
public ResponseBean buildingList(Integer pageNum, Integer pageSize, String name, String code, LocalDateTime startDate, String buildingStatus, String marketStatus, Integer cityId, Integer isMain, Integer orgId, List<TaPersonBuilding> taPersonBuildingList) {
|
116
|
122
|
Page<TaBuilding> page = new Page<>();
|
|
@@ -488,7 +494,7 @@ public class TaBuildingServiceImpl extends ServiceImpl<TaBuildingMapper, TaBuild
|
488
|
494
|
}
|
489
|
495
|
|
490
|
496
|
@Override
|
491
|
|
- public ResponseBean buildingAdd(String parameter, Integer orgId) {
|
|
497
|
+ public ResponseBean buildingAdd(String parameter, Integer orgId, Integer userId) {
|
492
|
498
|
ResponseBean responseBean = new ResponseBean();
|
493
|
499
|
|
494
|
500
|
JSONObject object = JSONObject.parseObject(parameter);
|
|
@@ -524,6 +530,14 @@ public class TaBuildingServiceImpl extends ServiceImpl<TaBuildingMapper, TaBuild
|
524
|
530
|
tdCityMapper.updateById(city);
|
525
|
531
|
}
|
526
|
532
|
|
|
533
|
+ //新建项目以后自动授权给当前用户
|
|
534
|
+ TaUser taUser = taUserMapper.selectById(userId);
|
|
535
|
+ TaPersonBuilding taPersonBuilding = new TaPersonBuilding();
|
|
536
|
+ taPersonBuilding.setBuildingId(building.getBuildingId());
|
|
537
|
+ taPersonBuilding.setUserId(taUser.getUserId());
|
|
538
|
+ taPersonBuilding.setCreateDate(LocalDateTime.now());
|
|
539
|
+ taPersonBuildingMapper.insert(taPersonBuilding);
|
|
540
|
+
|
527
|
541
|
// 项目主图
|
528
|
542
|
String imgStr = object.getString("img");
|
529
|
543
|
List<TaBuildingImg> buildingImgs = JSONObject.parseArray(imgStr, TaBuildingImg.class);
|