|
@@ -1,23 +1,5 @@
|
1
|
1
|
package com.huiju.estateagents.reportCustomerAop;
|
2
|
2
|
|
3
|
|
-import java.time.LocalDateTime;
|
4
|
|
-import java.util.List;
|
5
|
|
-import java.util.Map;
|
6
|
|
-
|
7
|
|
-import javax.servlet.http.HttpServletRequest;
|
8
|
|
-
|
9
|
|
-import com.alibaba.fastjson.JSONObject;
|
10
|
|
-import org.aspectj.lang.JoinPoint;
|
11
|
|
-import org.aspectj.lang.annotation.After;
|
12
|
|
-import org.aspectj.lang.annotation.Aspect;
|
13
|
|
-import org.aspectj.lang.annotation.Before;
|
14
|
|
-import org.aspectj.lang.annotation.Pointcut;
|
15
|
|
-import org.aspectj.lang.reflect.MethodSignature;
|
16
|
|
-import org.slf4j.Logger;
|
17
|
|
-import org.slf4j.LoggerFactory;
|
18
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
19
|
|
-import org.springframework.stereotype.Component;
|
20
|
|
-
|
21
|
3
|
import com.huiju.estateagents.base.BaseController;
|
22
|
4
|
import com.huiju.estateagents.base.ResponseBean;
|
23
|
5
|
import com.huiju.estateagents.common.CommConstant;
|
|
@@ -28,6 +10,20 @@ import com.huiju.estateagents.entity.TaPerson;
|
28
|
10
|
import com.huiju.estateagents.mapper.TaBuildingMapper;
|
29
|
11
|
import com.huiju.estateagents.mapper.TaPersonMapper;
|
30
|
12
|
import com.huiju.estateagents.service.ITaRecommendCustomerService;
|
|
13
|
+import org.aspectj.lang.JoinPoint;
|
|
14
|
+import org.aspectj.lang.annotation.After;
|
|
15
|
+import org.aspectj.lang.annotation.Aspect;
|
|
16
|
+import org.aspectj.lang.annotation.Pointcut;
|
|
17
|
+import org.aspectj.lang.reflect.MethodSignature;
|
|
18
|
+import org.slf4j.Logger;
|
|
19
|
+import org.slf4j.LoggerFactory;
|
|
20
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
21
|
+import org.springframework.stereotype.Component;
|
|
22
|
+
|
|
23
|
+import javax.servlet.http.HttpServletRequest;
|
|
24
|
+import java.time.LocalDateTime;
|
|
25
|
+import java.util.List;
|
|
26
|
+import java.util.Map;
|
31
|
27
|
|
32
|
28
|
@Aspect
|
33
|
29
|
@Component
|
|
@@ -72,7 +68,7 @@ public class ReportCustomerAspect extends BaseController {
|
72
|
68
|
HttpServletRequest request = (HttpServletRequest) args[4];
|
73
|
69
|
|
74
|
70
|
Map<String, Object> stringObjectMap = getBuildingByIdAndType(targetId, targetType);
|
75
|
|
- if (request == null) {
|
|
71
|
+ if (!CommConstant.INDEX.equals(targetType) && request == null) {
|
76
|
72
|
responseBean.addError("未授权,不进行操作");
|
77
|
73
|
return responseBean;
|
78
|
74
|
}
|
|
@@ -86,14 +82,14 @@ public class ReportCustomerAspect extends BaseController {
|
86
|
82
|
TaPerson taPerson = persons.get(0);
|
87
|
83
|
Integer orgId = getOrgId(request);
|
88
|
84
|
|
89
|
|
- TaCustomerFrom taCustomerFrom = assembleVO(taPerson, targetType, targetId, stringObjectMap.get("targetName").toString(), orgId, sceneId, channelId, qrCodeId);
|
|
85
|
+ TaCustomerFrom taCustomerFrom = assembleVO(taPerson, targetType, targetId, null == stringObjectMap ? null : stringObjectMap.get("targetName").toString(), orgId, StringUtils.ifNull(sceneId,null), channelId, qrCodeId);
|
90
|
86
|
// 推广人
|
91
|
87
|
TaPerson recPerson = StringUtils.isEmpty(recommend) ? null : taPersonMapper.getById(recommend);
|
92
|
88
|
// 是否置业顾问
|
93
|
89
|
boolean isConsultant = null != recPerson && CommConstant.PERSON_REALTY_CONSULTANT.equals(recPerson.getPersonType());
|
94
|
90
|
TaPerson consultantInfo = null != consultantPersonId ? reportCustomerImpl.getPerson(consultantPersonId) : (isConsultant ? recPerson : null);
|
95
|
91
|
// 推荐楼盘
|
96
|
|
- TaBuilding taBuilding = (TaBuilding) stringObjectMap.get("taBuilding");
|
|
92
|
+ TaBuilding taBuilding = null == stringObjectMap ? null : (TaBuilding) stringObjectMap.get("taBuilding");
|
97
|
93
|
TaBuilding building = taBuilding == null ? null : taBuildingMapper.selectById(taBuilding.getBuildingId());
|
98
|
94
|
|
99
|
95
|
if (StringUtils.isEmpty(taPerson.getPhone())) {
|
|
@@ -161,6 +157,8 @@ public class ReportCustomerAspect extends BaseController {
|
161
|
157
|
case CommConstant.HOUSE:
|
162
|
158
|
buildingAndNameInfo = reportCustomerImpl.selectHouseBuildingInfo(targetId);
|
163
|
159
|
break;
|
|
160
|
+ case CommConstant.INDEX:
|
|
161
|
+ break;
|
164
|
162
|
default:
|
165
|
163
|
buildingAndNameInfo = reportCustomerImpl.selectBuildingInfo(targetId);
|
166
|
164
|
break;
|