...
|
...
|
@@ -66,7 +66,14 @@ public class ClickUnionRest { |
|
|
if ("iphone".equals(request.getClient_type())) {
|
|
|
request.setClient_type(ClientTypeEnum.IOS.getName());
|
|
|
}
|
|
|
request.setClientIp(RemoteIPInterceptor.getRemoteIP());
|
|
|
String IP = RemoteIPInterceptor.getRemoteIP();
|
|
|
// String IP = "42.236.215.29, 123.151.42.48";
|
|
|
String clientIp = null;
|
|
|
if(StringUtils.isNotEmpty(IP)){
|
|
|
String[] IPS = IP.split(",");
|
|
|
clientIp = IPS[0];
|
|
|
}
|
|
|
request.setClientIp(clientIp);
|
|
|
clickUnion.info("addUnion with param is {}", request);
|
|
|
UnionResponse response = unionService.clickUnion(request);
|
|
|
log.info("addUnion with result is {}, and request is {}", response, request);
|
...
|
...
|
@@ -91,8 +98,13 @@ public class ClickUnionRest { |
|
|
}else {
|
|
|
request = unionService.clickHttpRequestTOBO(httpServletRequest,request);
|
|
|
}
|
|
|
|
|
|
request.setClientIp(RemoteIPInterceptor.getRemoteIP());
|
|
|
String IP = RemoteIPInterceptor.getRemoteIP();
|
|
|
String clientIp = null;
|
|
|
if(StringUtils.isNotEmpty(IP)){
|
|
|
String[] IPS = IP.split(",");
|
|
|
clientIp = IPS[0];
|
|
|
}
|
|
|
request.setClientIp(clientIp);
|
|
|
// IUnionService service = SpringContextUtil.getBean(bean, IUnionService.class);
|
|
|
clickUnion.info("addCommonUnion request is {}",request);
|
|
|
UnionResponse response = unionService.clickUnion(request);
|
...
|
...
|
@@ -111,7 +123,13 @@ public class ClickUnionRest { |
|
|
public void addUnion4Special(ClickUnionRequestBO bo, HttpServletRequest request, HttpServletResponse response) {
|
|
|
log.info("addUnion4Special with param is {}", bo);
|
|
|
try {
|
|
|
bo.setClientIp(RemoteIPInterceptor.getRemoteIP());
|
|
|
String clientIp = null;
|
|
|
String IP = RemoteIPInterceptor.getRemoteIP();
|
|
|
if(StringUtils.isNotEmpty(IP)){
|
|
|
String[] IPS = IP.split(",");
|
|
|
clientIp = IPS[0];
|
|
|
}
|
|
|
bo.setClientIp(clientIp);
|
|
|
String agent = request.getHeader("user-agent");
|
|
|
log.info("user-agent={}", agent);
|
|
|
if (StringUtils.isEmpty(agent)) {
|
...
|
...
|
@@ -162,7 +180,13 @@ public class ClickUnionRest { |
|
|
if (StringUtils.isEmpty(bo.getUnion_type())) {
|
|
|
return;
|
|
|
}
|
|
|
bo.setClientIp(RemoteIPInterceptor.getRemoteIP());
|
|
|
String clientIp = null;
|
|
|
String IP = RemoteIPInterceptor.getRemoteIP();
|
|
|
if(StringUtils.isNotEmpty(IP)){
|
|
|
String[] IPS = IP.split(",");
|
|
|
clientIp = IPS[0];
|
|
|
}
|
|
|
bo.setClientIp(clientIp);
|
|
|
bo.setClient_type("android");
|
|
|
bo.setAppid("com.yoho");
|
|
|
String agent = request.getHeader("user-agent");
|
...
|
...
|
@@ -222,8 +246,14 @@ public class ClickUnionRest { |
|
|
String key = e.nextElement();
|
|
|
log.info("addMonitor with key={}, value={}", key, request.getParameter(key));
|
|
|
}
|
|
|
String IP = RemoteIPInterceptor.getRemoteIP();
|
|
|
String clientIp = null;
|
|
|
if(StringUtils.isNotEmpty(IP)){
|
|
|
String[] IPS = IP.split(",");
|
|
|
clientIp = IPS[0];
|
|
|
}
|
|
|
|
|
|
bo.setClientIp(RemoteIPInterceptor.getRemoteIP());
|
|
|
bo.setClientIp(clientIp);
|
|
|
String agent = request.getHeader("user-agent");
|
|
|
log.info("addMonitor user-agent={}", agent);
|
|
|
try{
|
...
|
...
|
|