class IndexFileLoader {

    @PostConstruct
    public void init() {
        // 第二层级的 推广计划 索引加载
        List<String> adPlanStrings = loadDumpData(
                String.format("%s%s", DConstant.DATA_ROOT_DIR, DConstant.AD_PLAN)
        );
        adPlanStrings.forEach(adPlanString -> AdLevelDataHandler.handleLevel2(
                JSON.parseObject(adPlanString, AdPlanTable.class),
                OpType.ADD
        ));

        // 第二层级的 创意 索引加载
        List<String> adCreativeStrings = loadDumpData(
            String.format("%s%s", DConstant.DATA_ROOT_DIR, DConstant.AD_CREATIVE)
        );
        adCreativeStrings.forEach(adCreativeString -> AdLevelDataHandler.handleLevel2(
                JSON.parseObject(adCreativeString, AdCreativeTable.class),
                OpType.ADD
        ));

        // 第三层级的 推广单元 索引加载
        List<String> adUnitStrings = loadDumpData(
                String.format("%s%s", DConstant.DATA_ROOT_DIR, DConstant.AD_UNIT)
        );
        adUnitStrings.forEach(adUnitString -> AdLevelDataHandler.handleLevel3(
                JSON.parseObject(adUnitString, AdUnitTable.class),
                OpType.ADD
        ));

        // 第三层级的 创意与推广单元关联 索引加载
        List<String> adCreativeUnitStrings = loadDumpData(
                String.format("%s%s", DConstant.DATA_ROOT_DIR, DConstant.AD_CREATIVE_UNIT)
        );
        adCreativeUnitStrings.forEach(adCreativeUnitString -> AdLevelDataHandler.handleLevel3(
                JSON.parseObject(adCreativeUnitString, AdCreativeUnitTable.class),
                OpType.ADD
        ));

        // 第四层级  推广单元地域限制 索引加载
        List<String> adUnitDistrictStrings = loadDumpData(
                String.format("%s%s", DConstant.DATA_ROOT_DIR, DConstant.AD_UNIT_DISTRICT)
        );
        adUnitDistrictStrings.forEach(adUnitDistrictString -> AdLevelDataHandler.handleLevel4(
                JSON.parseObject(adUnitDistrictString, AdUnitDistrictTable.class),
                OpType.ADD
        ));

        // 第四层级 推广单元兴趣限制 索引加载
        List<String> adUnitItStrings = loadDumpData(
                String.format("%s%s", DConstant.DATA_ROOT_DIR, DConstant.AD_UNIT_IT)
        );
        adUnitItStrings.forEach(adUnitItString -> AdLevelDataHandler.handleLevel4(
                JSON.parseObject(adUnitItString, AdUnitItTable.class),
                OpType.ADD
        ));

        // 第四层级 推广单元关键词限制 索引加载
        List<String> adUnitKeywordStrings = loadDumpData(
                String.format("%s%s", DConstant.DATA_ROOT_DIR, DConstant.AD_UNIT_KEYWORD)
        );
        adUnitKeywordStrings.forEach(adUnitKeywordString -> AdLevelDataHandler.handleLevel4(
                JSON.parseObject(adUnitKeywordString, AdUnitKeywordTable.class),
                OpType.ADD
        ));
    }

}