package com.hzya.frame.sysnew.comparison.controlsLog.dao.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
import com.hzya.frame.sysnew.comparison.controlsLog.dao.IControlsLogDao;
import com.hzya.frame.sysnew.comparison.controlsLog.entity.ControlsLogEntity;
import com.hzya.frame.uuid.UUIDUtils;
import org.springframework.stereotype.Repository;

@Repository(value = "controlsLogDaoImpl")
public class ControlsLogDaoImpl  extends MybatisGenericDao<ControlsLogEntity, String> implements IControlsLogDao {

    //操作日志新增
    @Override
    public ControlsLogEntity saveControlsLog(String formmainId,String sourceName,String code,String sourceData,String optionType,String optionName,String dbName,String dataType) {
        ControlsLogEntity controlsLogEntity=new ControlsLogEntity();
        controlsLogEntity.setId(UUIDUtils.getUUID());
        controlsLogEntity.setFormmainId(formmainId);
        controlsLogEntity.setSourceName(sourceName);
        controlsLogEntity.setCode(code);
        controlsLogEntity.setSourceData(sourceData);
        controlsLogEntity.setOptionType(optionType);
        controlsLogEntity.setOptionName(optionName);
        controlsLogEntity.setDbName(dbName);
        controlsLogEntity.setDataType(dataType);
        controlsLogEntity.setCreate_user_id("c796fd9ba4c9f5ff3cc2fa41a040e443");
        controlsLogEntity.setModify_user_id("c796fd9ba4c9f5ff3cc2fa41a040e443");
        controlsLogEntity.setOrg_id("0");
        ControlsLogEntity save = super.save(getSqlIdPrifx() + "saveControlsLog", controlsLogEntity);
        return save;
    }
}
