package com.customer.mapper; import com.customer.pojo.TableInfo; import com.customer.vo.TableInfoVO; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.session.RowBounds; import java.util.List; import java.util.Map; public interface TableInfoMapper { //---------------------------------mysql------------------------------------------ /** * 使用数据库 */ void useDataBase(String dataBaseName); /** * 创建msql数据库表 */ void createMysqlDataBase(@Param("dataBaseName") String dataBaseName,@Param("tableName") String tableName,@Param("tableComment") String tableComment,@Param("filedList") List filedList); /** * 查询mysql数据库是否存在 */ int mysqlDataBaseExist(String dataBaseName); /** * 查询数据库表是否存在 */ int mysqlTableExist(@Param("dataBaseName") String dataBaseName,@Param("tableName") String tableName); /** * 查询数据库中的表信息 */ List tableInfoList(@Param("databaseName") String databaseName,@Param("map") Map map, RowBounds rowBounds); /** * 查询表中有没有数据 */ int selectDataCount(String tableName); /** * 删除表 */ void dropMysqlTable(String tableName); /** * 修改mysql数据表 */ void updateMysqlTable(@Param("dataBaseName") String dataBaseName,@Param("tableName") String tableName,@Param("tableComment") String tableComment,@Param("filedList") List filedList); /** * 获取表字段信息 */ List mysqlTableFieldInfo(@Param("dataBaseName") String dataBaseName,@Param("tableName") String tableName); //---------------------------------sqlServer------------------------------------------ /** * 查询数据库表是否存在 */ int sqlServerTableExist(String tableName); /** * 创建数据库 */ void createSqlServerDataBase(String dataBaseName); /** * 创建数据表 */ void createSqlServerTable(@Param("dataBaseName") String dataBaseName,@Param("tableName") String tableName,@Param("filedList") List filedList,@Param("descriptionList") List descriptionList); /** * 判断数据库是否存在 */ int existOrNot(@Param("dataBaseName") String dataBaseName); /** * 获取当前库中所有表信息 */ List sqlServerTableInfoList(String databaseName); /** * 查询表中是否有数据 */ int selectSqlServerDataCount(String tableName); /** * 删除当前库中表 */ void dropSqlserverTable(String tableName); /** * 修改sqlserver数据表 */ void updateSqlserverTable(@Param("tableName") String tableName,@Param("filedList") List filedList,@Param("descriptionList") List descriptionList); //---------------------------------DM------------------------------------------ /** * 查询数据库表是否存在 */ int dmTableExist(@Param("dataBaseName") String dataBaseName,@Param("tableName") String tableName); /** * 查询数据库是否存在 */ int dmDataBaseExist(String databaseName); /** * 创建数据库 */ void createDmDataBase(String databaseName); /** * 创建数据表 */ void createDmTable(@Param("databaseName") String databaseName,@Param("tableName") String tableName,@Param("filedList") List filedList); /** * 添加表注释 */ void addTableDescription(String description); /** * 库中所有表信息 */ List dmTableInfoList(String databaseName); /** * 查询表行数 */ int selectDmDataCount(String tableName); /** * 删除数据表 */ void dropDmTable(String tableName); //---------------------------------oracle------------------------------------------ /** * 创建新用户 */ void createOracleUser(@Param("username") String username,@Param("password") String password); /** * 授予全部权限 */ void assignAuthority(String username); /** * 判断当前用户下表是否存在 */ int oracleTableExist(String tableName); /** * 创建oracle数据表 */ void createOracleTable(@Param("tableName") String tableName,@Param("filedList") List filedList); // void createOracleTable(@Param("username") String username,@Param("tableName") String tableName,@Param("filedList") List filedList); /** * 添加注释 */ void addOracleTableDescription(String description); }