|
@@ -25,68 +25,10 @@ public class AbTestConfigContainer {
|
|
|
@Value("${ad.abtest.time.plan.code:555}")
|
|
|
String adTestCode;
|
|
|
|
|
|
-
|
|
|
- Map<String,List<JSONObject>> adTimePlanMap=new HashMap<>();
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
public Boolean containsCode(Map<String,List<JSONObject>> configMap,String code){
|
|
|
return configMap.keySet().contains(code);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
public Boolean inWithoutAdTime(Map<String,List<JSONObject>> abConfigMap,String code,Integer hourOfDay){
|
|
|
Boolean flag=false;
|
|
|
for(JSONObject object:abConfigMap.getOrDefault(code,new ArrayList<>())){
|
|
@@ -94,19 +36,16 @@ public class AbTestConfigContainer {
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
return flag;
|
|
|
}
|
|
|
|
|
|
public Boolean inAdTimeTest(JSONObject abExpInfo){
|
|
|
-
|
|
|
List<Map<String,Object>> mapList=(List)abExpInfo.get("ab_test002");
|
|
|
for(Map<String,Object> map:mapList){
|
|
|
if(adTestCode.equals(map.getOrDefault("abExpCode",""))){
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
return false;
|
|
|
}
|
|
|
|