|
@@ -8,10 +8,8 @@ import com.yunzhi.marketing.base.BaseController;
|
8
|
8
|
import com.yunzhi.marketing.base.ResponseBean;
|
9
|
9
|
import com.yunzhi.marketing.common.CommConstant;
|
10
|
10
|
import com.yunzhi.marketing.common.StringUtils;
|
11
|
|
-import com.yunzhi.marketing.entity.TaBuilding;
|
12
|
|
-import com.yunzhi.marketing.entity.TaOrg;
|
13
|
|
-import com.yunzhi.marketing.entity.TaPerson;
|
14
|
|
-import com.yunzhi.marketing.entity.TaPersonBuilding;
|
|
11
|
+import com.yunzhi.marketing.entity.*;
|
|
12
|
+import com.yunzhi.marketing.mapper.TaBuildingApartmentMapper;
|
15
|
13
|
import com.yunzhi.marketing.mapper.TaBuildingMapper;
|
16
|
14
|
import com.yunzhi.marketing.mapper.TaOrgMapper;
|
17
|
15
|
import com.yunzhi.marketing.reportCustomerAop.ReportCustomer;
|
|
@@ -68,6 +66,8 @@ public class TaBuildingController extends BaseController {
|
68
|
66
|
@Autowired
|
69
|
67
|
private ISceneLogService iSceneLogService;
|
70
|
68
|
|
|
69
|
+ @Autowired
|
|
70
|
+ TaBuildingApartmentMapper taBuildingApartmentMapper;
|
71
|
71
|
|
72
|
72
|
/**
|
73
|
73
|
* 楼盘详情
|
|
@@ -201,7 +201,11 @@ public class TaBuildingController extends BaseController {
|
201
|
201
|
})
|
202
|
202
|
@RequestMapping(value = "/admin/building/add", method = RequestMethod.POST)
|
203
|
203
|
public ResponseBean buildingAdd(@RequestBody String parameter, HttpServletRequest request) {
|
204
|
|
- return taBuildingService.buildingAdd(parameter, getOrgId(request), getUserId(request));
|
|
204
|
+ ResponseBean responseBean = taBuildingService.buildingAdd(parameter, getOrgId(request), getUserId(request));
|
|
205
|
+ JSONObject object = JSONObject.parseObject(parameter);
|
|
206
|
+ TaBuilding building = object.toJavaObject(TaBuilding.class);
|
|
207
|
+ iSceneLogService.saveLogs(getUserId(request),"building",building.getBuildingId());
|
|
208
|
+ return responseBean;
|
205
|
209
|
}
|
206
|
210
|
|
207
|
211
|
/**
|
|
@@ -216,7 +220,11 @@ public class TaBuildingController extends BaseController {
|
216
|
220
|
})
|
217
|
221
|
@RequestMapping(value = "/admin/building/update/status", method = RequestMethod.PUT)
|
218
|
222
|
public ResponseBean buildingUpdateStatus(@RequestBody String parameter, HttpServletRequest request) {
|
219
|
|
- return taBuildingService.buildingUpdateStatus(parameter, getOrgId(request));
|
|
223
|
+ ResponseBean responseBean = taBuildingService.buildingUpdateStatus(parameter, getOrgId(request));
|
|
224
|
+ JSONObject jsonobject = JSONObject.parseObject(parameter);
|
|
225
|
+ String id = jsonobject.getString("id");
|
|
226
|
+ iSceneLogService.saveLogs(getUserId(request),"building",id);
|
|
227
|
+ return responseBean;
|
220
|
228
|
}
|
221
|
229
|
|
222
|
230
|
/**
|
|
@@ -232,7 +240,9 @@ public class TaBuildingController extends BaseController {
|
232
|
240
|
})
|
233
|
241
|
@RequestMapping(value = "/admin/building/delete/{id}", method = RequestMethod.DELETE)
|
234
|
242
|
public ResponseBean buildingdelete(@PathVariable("id") String id, HttpServletRequest request) {
|
235
|
|
- return taBuildingService.buildingdelete(id, getOrgId(request));
|
|
243
|
+ ResponseBean buildingdelete = taBuildingService.buildingdelete(id, getOrgId(request));
|
|
244
|
+ iSceneLogService.saveLogs(getUserId(request),"building",id);
|
|
245
|
+ return buildingdelete;
|
236
|
246
|
}
|
237
|
247
|
|
238
|
248
|
/**
|
|
@@ -244,8 +254,11 @@ public class TaBuildingController extends BaseController {
|
244
|
254
|
*/
|
245
|
255
|
@ApiOperation(value = "添加户型", notes = "添加户型")
|
246
|
256
|
@RequestMapping(value = "/admin/buildingApartment/add", method = RequestMethod.POST)
|
247
|
|
- public ResponseBean buildingApartment(@RequestBody String parameter, HttpSession session) {
|
248
|
|
- return taBuildingService.buildingApartmentAdd(parameter);
|
|
257
|
+ public ResponseBean buildingApartment(@RequestBody String parameter, HttpSession session,HttpServletRequest request) {
|
|
258
|
+ ResponseBean responseBean = taBuildingService.buildingApartmentAdd(parameter);
|
|
259
|
+ TaBuildingApartment building = JSONObject.parseObject(parameter, TaBuildingApartment.class);
|
|
260
|
+ iSceneLogService.saveLogs(getUserId(request),"apartment",building.getBuildingId());
|
|
261
|
+ return responseBean;
|
249
|
262
|
}
|
250
|
263
|
|
251
|
264
|
/**
|
|
@@ -256,8 +269,11 @@ public class TaBuildingController extends BaseController {
|
256
|
269
|
*/
|
257
|
270
|
@ApiOperation(value = "户型编辑", notes = "户型编辑")
|
258
|
271
|
@RequestMapping(value = "/admin/buildingApartment/update", method = RequestMethod.PUT)
|
259
|
|
- public ResponseBean buildingApartmentUpdate(@RequestBody String parameter) {
|
260
|
|
- return taBuildingService.buildingApartmentUpdate(parameter);
|
|
272
|
+ public ResponseBean buildingApartmentUpdate(@RequestBody String parameter,HttpServletRequest request) {
|
|
273
|
+ ResponseBean responseBean = taBuildingService.buildingApartmentUpdate(parameter);
|
|
274
|
+ TaBuildingApartment building = JSONObject.parseObject(parameter, TaBuildingApartment.class);
|
|
275
|
+ iSceneLogService.saveLogs(getUserId(request),"apartment",building.getBuildingId());
|
|
276
|
+ return responseBean;
|
261
|
277
|
}
|
262
|
278
|
|
263
|
279
|
/**
|
|
@@ -426,8 +442,13 @@ public class TaBuildingController extends BaseController {
|
426
|
442
|
* @return
|
427
|
443
|
*/
|
428
|
444
|
@RequestMapping(value = "/admin/apartment/deleted/{id}", method = RequestMethod.DELETE)
|
429
|
|
- public ResponseBean apartmentDeleted(@PathVariable(value = "id") String id) {
|
430
|
|
- return taBuildingService.apartmentDel(id);
|
|
445
|
+ public ResponseBean apartmentDeleted(@PathVariable(value = "id") String id,HttpServletRequest request) {
|
|
446
|
+ ResponseBean responseBean = taBuildingService.apartmentDel(id);
|
|
447
|
+ QueryWrapper<TaBuildingApartment> buildingApartmentQueryWrapper = new QueryWrapper<>();
|
|
448
|
+ buildingApartmentQueryWrapper.eq("apartment_id", id);
|
|
449
|
+ TaBuildingApartment buildingApartment = taBuildingApartmentMapper.selectOne(buildingApartmentQueryWrapper);
|
|
450
|
+ iSceneLogService.saveLogs(getUserId(request),"apartment",buildingApartment.getBuildingId());
|
|
451
|
+ return responseBean;
|
431
|
452
|
}
|
432
|
453
|
|
433
|
454
|
/**
|
|
@@ -489,7 +510,7 @@ public class TaBuildingController extends BaseController {
|
489
|
510
|
|
490
|
511
|
@ApiOperation(value = "admin - 解绑驻场人员", notes = "admin - 解绑驻场人员")
|
491
|
512
|
@DeleteMapping(value = "/admin/marketing/{id}")
|
492
|
|
- public ResponseBean buildingDynamicFinish(@PathVariable String id) {
|
|
513
|
+ public ResponseBean buildingDynamicFinish(@PathVariable String id,HttpServletRequest request) {
|
493
|
514
|
ResponseBean responseBean = new ResponseBean();
|
494
|
515
|
TaPersonBuilding taPersonBuilding = taPersonBuildingService.getById(id);
|
495
|
516
|
|
|
@@ -504,6 +525,7 @@ public class TaBuildingController extends BaseController {
|
504
|
525
|
// 成为驻场顾问并绑定楼盘
|
505
|
526
|
taPerson.setPersonType(CommConstant.PERSON_ESTATE_CUSTOMER);
|
506
|
527
|
iTaPersonService.updateById(taPerson);
|
|
528
|
+ iSceneLogService.saveLogs(getUserId(request),"marketing",taPersonBuilding.getBuildingId());
|
507
|
529
|
}
|
508
|
530
|
|
509
|
531
|
responseBean.addSuccess("解绑成功");
|