|
@@ -60,7 +60,11 @@ public class ClickUnionRest { |
|
@@ -60,7 +60,11 @@ public class ClickUnionRest { |
60
|
if ("iphone".equals(request.getClient_type())) {
|
60
|
if ("iphone".equals(request.getClient_type())) {
|
61
|
request.setClient_type(ClientTypeEnum.IOS.getName());
|
61
|
request.setClient_type(ClientTypeEnum.IOS.getName());
|
62
|
}
|
62
|
}
|
63
|
- request.setClientIp(RemoteIPInterceptor.getRemoteIP());
|
63
|
+ String IP = RemoteIPInterceptor.getRemoteIP();
|
|
|
64
|
+// String IP = "42.236.215.29, 123.151.42.48";
|
|
|
65
|
+ String[] IPS = IP.split(",");
|
|
|
66
|
+ String clientIp = IPS[0];
|
|
|
67
|
+ request.setClientIp(clientIp);
|
64
|
clickUnion.info("addUnion with param is {}", request);
|
68
|
clickUnion.info("addUnion with param is {}", request);
|
65
|
UnionResponse response = unionService.clickUnion(request);
|
69
|
UnionResponse response = unionService.clickUnion(request);
|
66
|
log.info("addUnion with result is {}, and request is {}", response, request);
|
70
|
log.info("addUnion with result is {}, and request is {}", response, request);
|
|
@@ -85,8 +89,10 @@ public class ClickUnionRest { |
|
@@ -85,8 +89,10 @@ public class ClickUnionRest { |
85
|
}else {
|
89
|
}else {
|
86
|
request = unionService.clickHttpRequestTOBO(httpServletRequest,request);
|
90
|
request = unionService.clickHttpRequestTOBO(httpServletRequest,request);
|
87
|
}
|
91
|
}
|
88
|
-
|
|
|
89
|
- request.setClientIp(RemoteIPInterceptor.getRemoteIP());
|
92
|
+ String IP = RemoteIPInterceptor.getRemoteIP();
|
|
|
93
|
+ String[] IPS = IP.split(",");
|
|
|
94
|
+ String clientIp = IPS[0];
|
|
|
95
|
+ request.setClientIp(clientIp);
|
90
|
// IUnionService service = SpringContextUtil.getBean(bean, IUnionService.class);
|
96
|
// IUnionService service = SpringContextUtil.getBean(bean, IUnionService.class);
|
91
|
clickUnion.info("addCommonUnion request is {}",request);
|
97
|
clickUnion.info("addCommonUnion request is {}",request);
|
92
|
UnionResponse response = unionService.clickUnion(request);
|
98
|
UnionResponse response = unionService.clickUnion(request);
|
|
@@ -105,7 +111,10 @@ public class ClickUnionRest { |
|
@@ -105,7 +111,10 @@ public class ClickUnionRest { |
105
|
public void addUnion4Special(ClickUnionRequestBO bo, HttpServletRequest request, HttpServletResponse response) {
|
111
|
public void addUnion4Special(ClickUnionRequestBO bo, HttpServletRequest request, HttpServletResponse response) {
|
106
|
log.info("addUnion4Special with param is {}", bo);
|
112
|
log.info("addUnion4Special with param is {}", bo);
|
107
|
try {
|
113
|
try {
|
108
|
- bo.setClientIp(RemoteIPInterceptor.getRemoteIP());
|
114
|
+ String IP = RemoteIPInterceptor.getRemoteIP();
|
|
|
115
|
+ String[] IPS = IP.split(",");
|
|
|
116
|
+ String clientIp = IPS[0];
|
|
|
117
|
+ bo.setClientIp(clientIp);
|
109
|
String agent = request.getHeader("user-agent");
|
118
|
String agent = request.getHeader("user-agent");
|
110
|
log.info("user-agent={}", agent);
|
119
|
log.info("user-agent={}", agent);
|
111
|
if (StringUtils.isEmpty(agent)) {
|
120
|
if (StringUtils.isEmpty(agent)) {
|
|
@@ -156,7 +165,10 @@ public class ClickUnionRest { |
|
@@ -156,7 +165,10 @@ public class ClickUnionRest { |
156
|
if (StringUtils.isEmpty(bo.getUnion_type())) {
|
165
|
if (StringUtils.isEmpty(bo.getUnion_type())) {
|
157
|
return;
|
166
|
return;
|
158
|
}
|
167
|
}
|
159
|
- bo.setClientIp(RemoteIPInterceptor.getRemoteIP());
|
168
|
+ String IP = RemoteIPInterceptor.getRemoteIP();
|
|
|
169
|
+ String[] IPS = IP.split(",");
|
|
|
170
|
+ String clientIp = IPS[0];
|
|
|
171
|
+ bo.setClientIp(clientIp);
|
160
|
bo.setClient_type("android");
|
172
|
bo.setClient_type("android");
|
161
|
bo.setAppid("com.yoho");
|
173
|
bo.setAppid("com.yoho");
|
162
|
String agent = request.getHeader("user-agent");
|
174
|
String agent = request.getHeader("user-agent");
|
|
@@ -216,8 +228,11 @@ public class ClickUnionRest { |
|
@@ -216,8 +228,11 @@ public class ClickUnionRest { |
216
|
String key = e.nextElement();
|
228
|
String key = e.nextElement();
|
217
|
log.info("addMonitor with key={}, value={}", key, request.getParameter(key));
|
229
|
log.info("addMonitor with key={}, value={}", key, request.getParameter(key));
|
218
|
}
|
230
|
}
|
|
|
231
|
+ String IP = RemoteIPInterceptor.getRemoteIP();
|
|
|
232
|
+ String[] IPS = IP.split(",");
|
|
|
233
|
+ String clientIp = IPS[0];
|
219
|
|
234
|
|
220
|
- bo.setClientIp(RemoteIPInterceptor.getRemoteIP());
|
235
|
+ bo.setClientIp(clientIp);
|
221
|
String agent = request.getHeader("user-agent");
|
236
|
String agent = request.getHeader("user-agent");
|
222
|
log.info("addMonitor user-agent={}", agent);
|
237
|
log.info("addMonitor user-agent={}", agent);
|
223
|
try{
|
238
|
try{
|