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

import cn.orionsec.kit.spring.SpringHolder;
import cn.orionsec.ops.dao.CommandTemplateDAO;
import cn.orionsec.ops.entity.domain.CommandTemplateDO;
import cn.orionsec.ops.entity.importer.DataImportDTO;

public class CommandTemplateDataImporter extends AbstractDataImporter<CommandTemplateDO> {

    private static final CommandTemplateDAO commandTemplateDAO = SpringHolder.getBean(CommandTemplateDAO.class);

    public CommandTemplateDataImporter(DataImportDTO importData) {
        super(importData, commandTemplateDAO);
    }

    @Override
    protected void insertFiller(CommandTemplateDO row) {
        row.setCreateUserId(importData.getUserId());
        row.setCreateUserName(importData.getUserName());
        row.setUpdateUserId(importData.getUserId());
        row.setUpdateUserName(importData.getUserName());
    }

    @Override
    protected void updateFiller(CommandTemplateDO row) {
        row.setUpdateUserId(importData.getUserId());
        row.setUpdateUserName(importData.getUserName());
    }

}
