|
@@ -944,39 +944,42 @@ public class TaPersonServiceImpl extends ServiceImpl<TaPersonMapper, TaPerson> i
|
944
|
944
|
}
|
945
|
945
|
updateById(person);
|
946
|
946
|
|
947
|
|
- // 关联推荐客户
|
948
|
|
- fixCustomerPersonId(person);
|
|
947
|
+ // 发放积分
|
|
948
|
+ applicationContext.publishEvent(new EventBus(person, EventBus.EventType.SignUpAgent, orgId));
|
949
|
949
|
|
950
|
|
- // 客户来源
|
951
|
|
- customerFrom.setPersonId(person.getPersonId());
|
952
|
|
- customerFrom.setPersonName(StringUtils.ifNull(person.getName(), person.getNickname()));
|
953
|
|
- customerFrom.setCreateDate(now);
|
|
950
|
+// // 关联推荐客户
|
|
951
|
+// fixCustomerPersonId(person);
|
|
952
|
+//
|
|
953
|
+// // 客户来源
|
|
954
|
+// customerFrom.setPersonId(person.getPersonId());
|
|
955
|
+// customerFrom.setPersonName(StringUtils.ifNull(person.getName(), person.getNickname()));
|
|
956
|
+// customerFrom.setCreateDate(now);
|
954
|
957
|
|
955
|
958
|
// 推广人
|
956
|
|
- TaPerson recPerson = StringUtils.isEmpty(promoter) ? null : taPersonMapper.getById(promoter);
|
957
|
|
- // 推荐楼盘
|
958
|
|
- TaBuilding building = StringUtils.isEmpty(buildingId) ? null : taBuildingMapper.selectById(buildingId);
|
959
|
|
- // 置业顾问
|
960
|
|
- boolean isConsultant = null != recPerson && CommConstant.PERSON_REALTY_CONSULTANT.equals(recPerson.getPersonType());
|
961
|
|
- TaPerson consultant = null != consultantPersonId ? getById(consultantPersonId) : (isConsultant ? recPerson : null);
|
962
|
|
-
|
963
|
|
- try {
|
964
|
|
- List<TaRecommendCustomer> customerList = iTaRecommendCustomerService.newCustomer(orgId, person, recPerson, consultant, building, customerFrom);
|
965
|
|
- if (customerList.size() > 0) {
|
966
|
|
- // 发放积分
|
967
|
|
- applicationContext.publishEvent(new EventBus(person, EventBus.EventType.SignUpAgent, orgId));
|
968
|
|
-
|
969
|
|
- //授权手机给推广人加积分
|
970
|
|
- String sharePersonId = getSharePersonFrom(person);
|
971
|
|
- // 2020年5月29日 不清楚加场景限制的原因, 与芳芳讨论 先取消这个限制
|
972
|
|
-// if (validateSceneId(customerFrom.getSceneId()) && !StringUtils.isEmpty(sharePersonId)){
|
973
|
|
- if (!StringUtils.isEmpty(promoter) || !StringUtils.isEmpty(sharePersonId)){
|
974
|
|
- applicationContext.publishEvent(new EventBus(promoter != null ? promoter : sharePersonId, EventBus.EventType.SharePosterAll, orgId));
|
975
|
|
- }
|
976
|
|
- }
|
977
|
|
- } catch (Exception e) {
|
978
|
|
- throw e;
|
979
|
|
- }
|
|
959
|
+// TaPerson recPerson = StringUtils.isEmpty(promoter) ? null : taPersonMapper.getById(promoter);
|
|
960
|
+// // 推荐楼盘
|
|
961
|
+// TaBuilding building = StringUtils.isEmpty(buildingId) ? null : taBuildingMapper.selectById(buildingId);
|
|
962
|
+// // 置业顾问
|
|
963
|
+// boolean isConsultant = null != recPerson && CommConstant.PERSON_REALTY_CONSULTANT.equals(recPerson.getPersonType());
|
|
964
|
+// TaPerson consultant = null != consultantPersonId ? getById(consultantPersonId) : (isConsultant ? recPerson : null);
|
|
965
|
+//
|
|
966
|
+// try {
|
|
967
|
+// List<TaRecommendCustomer> customerList = iTaRecommendCustomerService.newCustomer(orgId, person, recPerson, consultant, building, customerFrom);
|
|
968
|
+// if (customerList.size() > 0) {
|
|
969
|
+// // 发放积分
|
|
970
|
+// applicationContext.publishEvent(new EventBus(person, EventBus.EventType.SignUpAgent, orgId));
|
|
971
|
+//
|
|
972
|
+// //授权手机给推广人加积分
|
|
973
|
+// String sharePersonId = getSharePersonFrom(person);
|
|
974
|
+// // 2020年5月29日 不清楚加场景限制的原因, 与芳芳讨论 先取消这个限制
|
|
975
|
+//// if (validateSceneId(customerFrom.getSceneId()) && !StringUtils.isEmpty(sharePersonId)){
|
|
976
|
+// if (!StringUtils.isEmpty(promoter) || !StringUtils.isEmpty(sharePersonId)){
|
|
977
|
+// applicationContext.publishEvent(new EventBus(promoter != null ? promoter : sharePersonId, EventBus.EventType.SharePosterAll, orgId));
|
|
978
|
+// }
|
|
979
|
+// }
|
|
980
|
+// } catch (Exception e) {
|
|
981
|
+// throw e;
|
|
982
|
+// }
|
980
|
983
|
}
|
981
|
984
|
|
982
|
985
|
private TaRecommendCustomer newOrFixCustomerBy(TaPerson person, String promoter, String buildingId) {
|