
package cn.orionsec.ops.handler.importer.impl;

import cn.orionsec.kit.spring.SpringHolder;
import cn.orionsec.ops.dao.ApplicationInfoDAO;
import cn.orionsec.ops.entity.domain.ApplicationInfoDO;
import cn.orionsec.ops.entity.importer.DataImportDTO;
import cn.orionsec.ops.service.api.ApplicationInfoService;


public class ApplicationDataImporter extends AbstractDataImporter<ApplicationInfoDO> {

    private static final ApplicationInfoDAO applicationInfoDAO = SpringHolder.getBean(ApplicationInfoDAO.class);

    private static final ApplicationInfoService applicationInfoService = SpringHolder.getBean(ApplicationInfoService.class);

    public ApplicationDataImporter(DataImportDTO importData) {
        super(importData, applicationInfoDAO);
    }

    @Override
    protected void insertFiller(ApplicationInfoDO row) {
        row.setAppSort(applicationInfoService.getNextSort());
    }

}
