class BaseDaoESImp implements BaseDao {

    @Override
    public Map<Double, BoolQueryBuilder> createQueryForSingleValuesWithRegionRatio(TargetingChannel targetingChannel)
    {

        Map<Double, BoolQueryBuilder> boolQueryBuilderRatioMap = new HashMap<>();
        if (!CommonUtil.isEmpty(targetingChannel.getResidenceCityNames()))
        {
            Map<Double, List<String>> ratioResidenceRegionMap =
                    RequestDataConverter.buildRatioResidenceRegionMap(targetingChannel.getResidenceCityNames());
            for (Map.Entry<Double, List<String>> entry : ratioResidenceRegionMap.entrySet())
            {
                BoolQueryBuilder boolQueryBuilder = createBaseQueryForSingleValues(targetingChannel);
                BoolQueryBuilder rsQuery = new BoolQueryBuilder();
                append(rsQuery, entry.getValue(), ES_PREDICTION_DOC_PREFIX + "r");
                boolQueryBuilder.must(rsQuery);
                boolQueryBuilderRatioMap.put(entry.getKey(), boolQueryBuilder);
            }
        }
        else if (!CommonUtil.isEmpty(targetingChannel.getIplCityCodes()))
        {
            Map<Double, List<String>> ratioCityCodeRegionMap =
                    RequestDataConverter.buildRatioCityCodeRegionMap(targetingChannel.getIplCityCodes());
            for (Map.Entry<Double, List<String>> entry : ratioCityCodeRegionMap.entrySet())
            {
                BoolQueryBuilder boolQueryBuilder = createBaseQueryForSingleValues(targetingChannel);
                BoolQueryBuilder riplQuery = new BoolQueryBuilder();
                append(riplQuery, entry.getValue(), ES_PREDICTION_DOC_PREFIX + "ipl");
                boolQueryBuilder.must(riplQuery);
                boolQueryBuilderRatioMap.put(entry.getKey(), boolQueryBuilder);
            }
        }
        else
        {
            BoolQueryBuilder boolQueryBuilder = createBaseQueryForSingleValues(targetingChannel);
            boolQueryBuilderRatioMap.put(1.0, boolQueryBuilder);
        }
        Iterator<Double> iter = boolQueryBuilderRatioMap.keySet().iterator();
        while (iter.hasNext())
        {
            double key = iter.next();
            if (Math.abs(key) < 0.00001)
            {
                iter.remove();
            }
        }

        return boolQueryBuilderRatioMap;
    }

    public  BaseDaoESImp();
    public  BaseDaoESImp(Properties properties);

}