| 
														
															@@ -25,68 +25,10 @@ public class AbTestConfigContainer { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     @Value("${ad.abtest.time.plan.code:555}") 
														 | 
														
														 | 
														
															     @Value("${ad.abtest.time.plan.code:555}") 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     String adTestCode; 
														 | 
														
														 | 
														
															     String adTestCode; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    //List<Tuple<Integer>> 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    Map<String,List<JSONObject>> adTimePlanMap=new HashMap<>(); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//    Map<Integer,Map<String,List<JSONObject>>> appAdTimePlanMap=new ConcurrentHashMap<>() ; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//    @PostConstruct 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//    public void initContainer(){ 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//        Timer timer = new Timer(); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//        timer.schedule(new TimerTask() { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//            @Override 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//            public void run() { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//                try { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-////                    for (Integer appType:appAdTimePlanMap.keySet()){ 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-////                        initMap(appType,"ab_test002"); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-////                    } 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//                    initMap(3,"ab_test002"); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-////                    log.info("svc=refresh_adTimePlanMap appAdTimePlanMap={}",JSONObject.toJSONString(appAdTimePlanMap)); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//                    log.info("svc=refresh_adTimePlanMap adTimePlanMap={}",JSONObject.toJSONString(adTimePlanMap)); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//                }catch (Exception e){ 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//                    e.printStackTrace(); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//                } 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//            } 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//        }, 0, 1000*30); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//    } 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															- 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//    public void initMap(Integer appType,String typeValue){ 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//        AbTestConfigRequest request=new  AbTestConfigRequest(); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//        if(appType==null){ 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//            request.setAppType(0); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//        }else{ 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//            request.setAppType(appType); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//        } 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//        request.setTypeValue(typeValue); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//        CommonResponse<JSONObject> response=longVideoFeign.getAbTestConfig(request); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//        log.info("svc=initAdTimePlanMap_getConfigFromLongVideoApi response={}",JSONObject.toJSONString(response)); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//        JSONObject object=response.getData(); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//        for(Map.Entry<String,Object> entry:object.getInnerMap().entrySet()){ 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//            for(Map<String,Object> map:(List<Map>)entry.getValue()){ 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//                if(adTestCode.equals(map.get("abExpCode").toString())){ 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//                    adTimePlanMap=JSONObject.parseObject(map.get("configValue").toString(),Map.class); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//                    break; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//                } 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//            } 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//        } 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//    } 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															- 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//    public Boolean containsCode(String code){ 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//        return adTimePlanMap.keySet().contains(code); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//    } 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															- 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     public Boolean containsCode(Map<String,List<JSONObject>> configMap,String code){ 
														 | 
														
														 | 
														
															     public Boolean containsCode(Map<String,List<JSONObject>> configMap,String code){ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         return configMap.keySet().contains(code); 
														 | 
														
														 | 
														
															         return configMap.keySet().contains(code); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     } 
														 | 
														
														 | 
														
															     } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//    public Boolean inWithoutAdTime(String code,Integer hourOfDay){ 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//        Boolean flag=false; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//        for(JSONObject object:adTimePlanMap.getOrDefault(code,new ArrayList<>())){ 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//            if(object.getInteger("x")<=hourOfDay&&hourOfDay<object.getInteger("y")){ 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//                return true; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//            } 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//        } 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//        return flag; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-//    } 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															- 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     public Boolean inWithoutAdTime(Map<String,List<JSONObject>> abConfigMap,String code,Integer hourOfDay){ 
														 | 
														
														 | 
														
															     public Boolean inWithoutAdTime(Map<String,List<JSONObject>> abConfigMap,String code,Integer hourOfDay){ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         Boolean flag=false; 
														 | 
														
														 | 
														
															         Boolean flag=false; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         for(JSONObject object:abConfigMap.getOrDefault(code,new ArrayList<>())){ 
														 | 
														
														 | 
														
															         for(JSONObject object:abConfigMap.getOrDefault(code,new ArrayList<>())){ 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -94,19 +36,16 @@ public class AbTestConfigContainer { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 return true; 
														 | 
														
														 | 
														
															                 return true; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             } 
														 | 
														
														 | 
														
															             } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         } 
														 | 
														
														 | 
														
															         } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        // 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         return flag; 
														 | 
														
														 | 
														
															         return flag; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     } 
														 | 
														
														 | 
														
															     } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     public Boolean inAdTimeTest(JSONObject abExpInfo){ 
														 | 
														
														 | 
														
															     public Boolean inAdTimeTest(JSONObject abExpInfo){ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        //todo youhua 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         List<Map<String,Object>> mapList=(List)abExpInfo.get("ab_test002"); 
														 | 
														
														 | 
														
															         List<Map<String,Object>> mapList=(List)abExpInfo.get("ab_test002"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         for(Map<String,Object> map:mapList){ 
														 | 
														
														 | 
														
															         for(Map<String,Object> map:mapList){ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             if(adTestCode.equals(map.getOrDefault("abExpCode",""))){ 
														 | 
														
														 | 
														
															             if(adTestCode.equals(map.getOrDefault("abExpCode",""))){ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 return true; 
														 | 
														
														 | 
														
															                 return true; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             } 
														 | 
														
														 | 
														
															             } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         } 
														 | 
														
														 | 
														
															         } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        // 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         return false; 
														 | 
														
														 | 
														
															         return false; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     } 
														 | 
														
														 | 
														
															     } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 |