Authored by linlong

update

@@ -169,9 +169,12 @@ @@ -169,9 +169,12 @@
169 group by union_type 169 group by union_type
170 </select> 170 </select>
171 <select id="queryActivateIdfaCount" resultType="java.lang.Integer" parameterType="com.yoho.service.model.union.request.ActivateDeviceIdReqBO"> 171 <select id="queryActivateIdfaCount" resultType="java.lang.Integer" parameterType="com.yoho.service.model.union.request.ActivateDeviceIdReqBO">
172 - select count(idfa) 172 + select count(1)
173 from union_click_logs 173 from union_click_logs
174 - where union_type = #{unionType} and idfa!='' 174 + where union_type = #{unionType}
  175 + <if test="interfaceType == null or interfaceType =='' ">
  176 + and interface_type in ('addUnion_ios','addUnion4Jump_ios','addMonitor_ios')
  177 + </if>
175 <if test="interfaceType != null and interfaceType !='' "> 178 <if test="interfaceType != null and interfaceType !='' ">
176 and interface_type=#{interfaceType} 179 and interface_type=#{interfaceType}
177 </if> 180 </if>
@@ -181,9 +184,12 @@ @@ -181,9 +184,12 @@
181 group by union_type 184 group by union_type
182 </select> 185 </select>
183 <select id="queryActivateImeiCount" resultType="java.lang.Integer" parameterType="com.yoho.service.model.union.request.ActivateDeviceIdReqBO"> 186 <select id="queryActivateImeiCount" resultType="java.lang.Integer" parameterType="com.yoho.service.model.union.request.ActivateDeviceIdReqBO">
184 - select count(imei) 187 + select count(1)
185 from union_click_logs 188 from union_click_logs
186 - where union_type = #{unionType} and imei!='' 189 + where union_type = #{unionType}
  190 + <if test="interfaceType == null or interfaceType =='' ">
  191 + and interface_type in ('addUnion_android','addUnion4Jump_android','addMonitor_android')
  192 + </if>
187 <if test="interfaceType != null and interfaceType !='' "> 193 <if test="interfaceType != null and interfaceType !='' ">
188 and interface_type=#{interfaceType} 194 and interface_type=#{interfaceType}
189 </if> 195 </if>
@@ -41,6 +41,7 @@ import org.springframework.stereotype.Service; @@ -41,6 +41,7 @@ import org.springframework.stereotype.Service;
41 41
42 import javax.annotation.Resource; 42 import javax.annotation.Resource;
43 import java.net.URLDecoder; 43 import java.net.URLDecoder;
  44 +import java.util.ArrayList;
44 import java.util.List; 45 import java.util.List;
45 import java.util.concurrent.ExecutorService; 46 import java.util.concurrent.ExecutorService;
46 import java.util.concurrent.LinkedBlockingQueue; 47 import java.util.concurrent.LinkedBlockingQueue;
@@ -109,6 +110,15 @@ public class UnionServiceImpl implements IUnionService,ApplicationEventPublisher @@ -109,6 +110,15 @@ public class UnionServiceImpl implements IUnionService,ApplicationEventPublisher
109 @Resource(name="unionServiceImpl") 110 @Resource(name="unionServiceImpl")
110 IUnionService unionService; 111 IUnionService unionService;
111 112
  113 + public final static List<String> IOS_INTERFACE_LIST = new ArrayList<String>(){{
  114 + add("addUnion_ios");add("addUnion4Jump_ios");add("addMonitor_ios");
  115 + }};
  116 +
  117 + public final static List<String> ANDROID_INTERFACE_LIST = new ArrayList<String>(){{
  118 + add("addUnion_android");add("addUnion4Jump_android");add("addMonitor_android");
  119 + }};
  120 +
  121 +
112 /** 122 /**
113 * 默认10个线程, 123 * 默认10个线程,
114 */ 124 */
@@ -607,10 +617,16 @@ public class UnionServiceImpl implements IUnionService,ApplicationEventPublisher @@ -607,10 +617,16 @@ public class UnionServiceImpl implements IUnionService,ApplicationEventPublisher
607 String dateStr = activateDeviceIdReqBO.getActivateTime().replaceAll("-","/"); 617 String dateStr = activateDeviceIdReqBO.getActivateTime().replaceAll("-","/");
608 activateDeviceIdReqBO.setActivateTimeStr(DateUtils.getTimesmorning(dateStr)); 618 activateDeviceIdReqBO.setActivateTimeStr(DateUtils.getTimesmorning(dateStr));
609 } 619 }
610 - if(activateDeviceIdReqBO.getIsIdfa()>0){  
611 - count = unionClickLogsDAO.queryActivateIdfaCount(activateDeviceIdReqBO); 620 + if(activateDeviceIdReqBO.getIsIdfa()>0 ){
  621 + //ios查询时,接口为全部或者是ios接口才查询
  622 + if(IOS_INTERFACE_LIST.contains(activateDeviceIdReqBO.getInterfaceType())||StringUtils.isEmpty(activateDeviceIdReqBO.getInterfaceType())){
  623 + count = unionClickLogsDAO.queryActivateIdfaCount(activateDeviceIdReqBO);
  624 + }
612 }else{ 625 }else{
613 - count = unionClickLogsDAO.queryActivateImeiCount(activateDeviceIdReqBO); 626 + //android查询时,接口为全部或者是android接口才查询
  627 + if(StringUtils.isEmpty(activateDeviceIdReqBO.getInterfaceType())|| ANDROID_INTERFACE_LIST.contains(activateDeviceIdReqBO.getInterfaceType())){
  628 + count = unionClickLogsDAO.queryActivateImeiCount(activateDeviceIdReqBO);
  629 + }
614 } 630 }
615 log.info("out queryActivateCount.count={}", count); 631 log.info("out queryActivateCount.count={}", count);
616 return count; 632 return count;