package com.mortals.xhx.base.system.gentable.dao.ibatis;

import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import com.mortals.framework.model.ParamDto;
import com.mortals.xhx.base.system.gentable.dao.GentableDao;
import com.mortals.xhx.base.system.gentable.model.GentableEntity;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
* <p>Title: 代码生成业务表</p>
* <p>Description: GentableDaoImpl DAO接口 </p>
* @author
* @version 1.0.0
*/
@Repository("gentableDao")
public class GentableDaoImpl extends BaseCRUDDaoMybatis<GentableEntity,Long> implements GentableDao {

    @Override
    public List<GentableEntity> selectDbTableList(ParamDto paramDto) {
        return getSqlSession().selectList(getSqlId("selectDbTableList"), paramDto);
    }

    @Override
    public List<GentableEntity> selectGenTableAll() {
        return getSqlSession().selectList(getSqlId("selectGenTableAll"));
    }

    @Override
    public List<GentableEntity> selectDbTableListByNames(String[] tableNames) {
        return getSqlSession().selectList(getSqlId("selectDbTableListByNames"), tableNames);
    }

    @Override
    public void createTable(String tableSql) {
        getSqlSession().update("createTable",tableSql);
    }
}
