|
@@ -555,5 +555,31 @@ public class TaBuildingController extends BaseController {
|
555
|
555
|
return ResponseBean.success("success");
|
556
|
556
|
}
|
557
|
557
|
|
|
558
|
+ @ApiOperation(value = "admin - 佣金管理员", notes = "admin - 佣金管理员")
|
|
559
|
+ @PutMapping(value = "/admin/building/{id}/broker-manager")
|
|
560
|
+ public ResponseBean switchBrokerManager(@ApiParam("楼盘ID") @PathVariable String id,
|
|
561
|
+ @ApiParam(value = "佣金管理员") @RequestBody TaPerson taPerson,
|
|
562
|
+ HttpServletRequest request) throws Exception {
|
|
563
|
+ TaBuilding taBuilding = taBuildingService.getById(id);
|
|
564
|
+ if (taBuilding == null || CommConstant.STATUS_DELETE.equals(taBuilding.getStatus())) {
|
|
565
|
+ return ResponseBean.error("未找到楼盘", ResponseBean.ERROR_ILLEGAL_PARAMS);
|
|
566
|
+ }
|
|
567
|
+
|
|
568
|
+ if (StringUtils.isEmpty(taPerson.getPersonId())) {
|
|
569
|
+ return ResponseBean.error("未找到人员信息", ResponseBean.ERROR_ILLEGAL_PARAMS);
|
|
570
|
+ }
|
|
571
|
+
|
|
572
|
+ TaPerson person = iTaPersonService.getById(taPerson);
|
|
573
|
+ if (null == person || !CommConstant.PERSON_MARKETING.equals(person.getPersonType())) {
|
|
574
|
+ return ResponseBean.error("当前人员非驻场人员", ResponseBean.ERROR_ILLEGAL_PARAMS);
|
|
575
|
+ }
|
|
576
|
+
|
|
577
|
+ TaPerson person1 = new TaPerson();
|
|
578
|
+ person1.setPersonId(person.getPersonId());
|
|
579
|
+ person1.setBrokerManager(null != taPerson.getBrokerManager() && taPerson.getBrokerManager());
|
|
580
|
+ iTaPersonService.updateById(person1);
|
|
581
|
+
|
|
582
|
+ return ResponseBean.success("success");
|
|
583
|
+ }
|
558
|
584
|
}
|
559
|
585
|
|