Showing
5 changed files
with
30 additions
and
1 deletions
@@ -78,6 +78,11 @@ public class ClickUnionRest { | @@ -78,6 +78,11 @@ public class ClickUnionRest { | ||
78 | String[] td1 = td.split("0_0_"); | 78 | String[] td1 = td.split("0_0_"); |
79 | request.setTd(td1[1]); | 79 | request.setTd(td1[1]); |
80 | } | 80 | } |
81 | + //增加监控,把接口报上去,根据client_type来判断 | ||
82 | + request.setInterfaceType("addUnion_ios"); | ||
83 | + if(StringUtils.isNotEmpty(request.getClient_type())&&request.getClient_type().equals(ClientTypeEnum.ANDROID.getName())){ | ||
84 | + request.setInterfaceType("addUnion_android"); | ||
85 | + } | ||
81 | clickUnion.info("addUnion with param is {}", request); | 86 | clickUnion.info("addUnion with param is {}", request); |
82 | UnionResponse response = unionService.clickUnion(request); | 87 | UnionResponse response = unionService.clickUnion(request); |
83 | // log.info("addUnion with result is {}, and request is {}", response, request); | 88 | // log.info("addUnion with result is {}, and request is {}", response, request); |
@@ -466,6 +471,12 @@ public class ClickUnionRest { | @@ -466,6 +471,12 @@ public class ClickUnionRest { | ||
466 | log.error("addUnion4Stream error with request={}", bo, e); | 471 | log.error("addUnion4Stream error with request={}", bo, e); |
467 | } | 472 | } |
468 | try { | 473 | try { |
474 | + | ||
475 | + //增加监控,把接口报上去,根据client_type来判断 | ||
476 | + bo.setInterfaceType("addUnion4Jump_ios"); | ||
477 | + if(StringUtils.isNotEmpty(bo.getClient_type())&&bo.getClient_type().equals(ClientTypeEnum.ANDROID.getName())){ | ||
478 | + bo.setInterfaceType("addUnion4Jump_android"); | ||
479 | + } | ||
469 | StringBuffer stringBuffer = new StringBuffer(); | 480 | StringBuffer stringBuffer = new StringBuffer(); |
470 | String bean = stringBuffer.append("UnionServiceImpl").append("_").append(bo.getUnion_type()).toString(); | 481 | String bean = stringBuffer.append("UnionServiceImpl").append("_").append(bo.getUnion_type()).toString(); |
471 | boolean containsBean = SpringContextUtil.containsBean(bean); | 482 | boolean containsBean = SpringContextUtil.containsBean(bean); |
@@ -529,6 +540,11 @@ public class ClickUnionRest { | @@ -529,6 +540,11 @@ public class ClickUnionRest { | ||
529 | log.error("addMonitor error with request={}",e1.getMessage()); | 540 | log.error("addMonitor error with request={}",e1.getMessage()); |
530 | } | 541 | } |
531 | 542 | ||
543 | + //增加监控,把接口报上去,根据client_type来判断 | ||
544 | + bo.setInterfaceType("addMonitor_ios"); | ||
545 | + if(StringUtils.isNotEmpty(bo.getClient_type())&&bo.getClient_type().equals(ClientTypeEnum.ANDROID.getName())){ | ||
546 | + bo.setInterfaceType("addMonitor_android"); | ||
547 | + } | ||
532 | clickUnion.info("addMonitor request={}", bo); | 548 | clickUnion.info("addMonitor request={}", bo); |
533 | //根据union_type区分不同的厂商 | 549 | //根据union_type区分不同的厂商 |
534 | String union_type = request.getParameter("union_type"); | 550 | String union_type = request.getParameter("union_type"); |
@@ -53,8 +53,10 @@ public class GDT2ServiceImpl extends UnionServiceImpl implements IUnionService { | @@ -53,8 +53,10 @@ public class GDT2ServiceImpl extends UnionServiceImpl implements IUnionService { | ||
53 | bo.setClient_type(app_type); | 53 | bo.setClient_type(app_type); |
54 | if(app_type.equals(ClientTypeEnum.ANDROID.getName())){ | 54 | if(app_type.equals(ClientTypeEnum.ANDROID.getName())){ |
55 | bo.setImei(muid); | 55 | bo.setImei(muid); |
56 | + bo.setInterfaceType("addMonitor_android"); | ||
56 | }else { | 57 | }else { |
57 | bo.setIdfa(muid); | 58 | bo.setIdfa(muid); |
59 | + bo.setInterfaceType("addMonitor_ios"); | ||
58 | } | 60 | } |
59 | bo.setAppid(request.getParameter("appid")); | 61 | bo.setAppid(request.getParameter("appid")); |
60 | bo.setClickId(request.getParameter("click_id")); | 62 | bo.setClickId(request.getParameter("click_id")); |
@@ -2,6 +2,7 @@ package com.yoho.unions.server.service.impl; | @@ -2,6 +2,7 @@ package com.yoho.unions.server.service.impl; | ||
2 | 2 | ||
3 | import javax.servlet.http.HttpServletRequest; | 3 | import javax.servlet.http.HttpServletRequest; |
4 | 4 | ||
5 | +import org.apache.commons.lang.StringUtils; | ||
5 | import org.slf4j.Logger; | 6 | import org.slf4j.Logger; |
6 | import org.slf4j.LoggerFactory; | 7 | import org.slf4j.LoggerFactory; |
7 | import org.springframework.stereotype.Service; | 8 | import org.springframework.stereotype.Service; |
@@ -23,6 +24,10 @@ public class TouTiaoServiceImpl extends UnionServiceImpl implements IUnionServic | @@ -23,6 +24,10 @@ public class TouTiaoServiceImpl extends UnionServiceImpl implements IUnionServic | ||
23 | bo = new ClickUnionRequestBO(); | 24 | bo = new ClickUnionRequestBO(); |
24 | String idfa = request.getParameter("idfa"); | 25 | String idfa = request.getParameter("idfa"); |
25 | String imei = request.getParameter("imei"); | 26 | String imei = request.getParameter("imei"); |
27 | + bo.setInterfaceType("addMonitor_ios"); | ||
28 | + if(StringUtils.isNotEmpty(imei)) { | ||
29 | + bo.setInterfaceType("addMonitor_android"); | ||
30 | + } | ||
26 | bo.setIdfa(idfa); | 31 | bo.setIdfa(idfa); |
27 | bo.setImei(imei); | 32 | bo.setImei(imei); |
28 | //将毫秒级的转换为秒级别---头条有时候不传 | 33 | //将毫秒级的转换为秒级别---头条有时候不传 |
@@ -467,7 +467,8 @@ public class UnionServiceImpl implements IUnionService,ApplicationEventPublisher | @@ -467,7 +467,8 @@ public class UnionServiceImpl implements IUnionService,ApplicationEventPublisher | ||
467 | }else if(StringUtils.isNotEmpty(request.getImei())){ | 467 | }else if(StringUtils.isNotEmpty(request.getImei())){ |
468 | muid = request.getImei(); | 468 | muid = request.getImei(); |
469 | } | 469 | } |
470 | - DeviceActiveEvent activeEvent = new DeviceActiveEvent("deviceActive",source,source_id,muid); | 470 | + String interfaceType = click.getInterfaceType(); |
471 | + DeviceActiveEvent activeEvent = new DeviceActiveEvent("deviceActive",source,source_id,muid,interfaceType); | ||
471 | 472 | ||
472 | //上报激活事件 | 473 | //上报激活事件 |
473 | try{ | 474 | try{ |
@@ -2,6 +2,7 @@ package com.yoho.unions.server.service.impl; | @@ -2,6 +2,7 @@ package com.yoho.unions.server.service.impl; | ||
2 | 2 | ||
3 | import javax.servlet.http.HttpServletRequest; | 3 | import javax.servlet.http.HttpServletRequest; |
4 | 4 | ||
5 | +import org.apache.commons.lang.StringUtils; | ||
5 | import org.slf4j.Logger; | 6 | import org.slf4j.Logger; |
6 | import org.slf4j.LoggerFactory; | 7 | import org.slf4j.LoggerFactory; |
7 | import org.springframework.stereotype.Service; | 8 | import org.springframework.stereotype.Service; |
@@ -26,6 +27,10 @@ public class WeiBoServiceImpl extends UnionServiceImpl implements IUnionService | @@ -26,6 +27,10 @@ public class WeiBoServiceImpl extends UnionServiceImpl implements IUnionService | ||
26 | String clicktime = request.getParameter("clicktime"); | 27 | String clicktime = request.getParameter("clicktime"); |
27 | Long click = Long.valueOf(clicktime); | 28 | Long click = Long.valueOf(clicktime); |
28 | clickUnionRequestBO.setIdfa(request.getParameter("idfa_md5")); | 29 | clickUnionRequestBO.setIdfa(request.getParameter("idfa_md5")); |
30 | + clickUnionRequestBO.setInterfaceType("addMonitor_ios"); | ||
31 | + if(StringUtils.isNotEmpty(request.getParameter("imei_md5"))){ | ||
32 | + clickUnionRequestBO.setInterfaceType("addMonitor_android"); | ||
33 | + } | ||
29 | clickUnionRequestBO.setImei(request.getParameter("imei_md5")); | 34 | clickUnionRequestBO.setImei(request.getParameter("imei_md5")); |
30 | clickUnionRequestBO.setClickTime(click/1000); | 35 | clickUnionRequestBO.setClickTime(click/1000); |
31 | clickUnionRequestBO.setCallbackurl(request.getParameter("IMP")); | 36 | clickUnionRequestBO.setCallbackurl(request.getParameter("IMP")); |
-
Please register or login to post a comment