package com.hzya.frame.sys.contrastTask.dao.impl;

import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.sys.contrastTask.entity.SaveBatchConTrastEntity;
import com.hzya.frame.sys.contrastTask.entity.SysContrastTaskEntity;
import com.hzya.frame.sys.contrastTask.dao.ISysContrastTaskDao;
import org.springframework.stereotype.Repository;
import com.hzya.frame.basedao.dao.MybatisGenericDao;

import java.util.List;

/**
 * 对照任务表(SysContrastTask)表数据库访问层
 *
 * @author makejava
 * @since 2023-08-08 16:33:58
 */
@Repository("SysContrastTaskDaoImpl")
public class SysContrastTaskDaoImpl extends MybatisGenericDao<SysContrastTaskEntity, String> implements ISysContrastTaskDao {

    @Override
    public Integer truncateTable(String tableName) {
        Integer o = (Integer) super.selectOne(getSqlIdPrifx() + "truncateTable", tableName);
        return o;

    }

    @Override
    public Integer saveBatchContrast(SaveBatchConTrastEntity saveBatchConTrastEntity) {
        Integer o = super.insert(getSqlIdPrifx() + "saveBatchContrast", saveBatchConTrastEntity);
        return o;

    }

    @Override
    public List<JSONObject> dosql(String sql) {
        List<JSONObject> o = (List<JSONObject>) super.selectList(getSqlIdPrifx() + "dosql", sql);
        return o;
    }
}

