whycxzp
2025-03-30 39b74c6fb4a50bed412bbebdd38440d384f47733
src/main/resources/mapper/CommonMapper.xml
@@ -164,17 +164,17 @@
    <select id="getMaxValue" resultType="java.lang.Object">
        select max(${field}) from ${schema}.${table}
    </select>
    <select id="existTable" resultType="java.lang.String">
        select
            table_name
        from `INFORMATION_SCHEMA`.`TABLES`
        where table_name = #{tableName}
        and TABLE_SCHEMA = #{dbName}
    <select id="existTable" resultType="java.lang.Boolean">
        SELECT EXISTS (
        SELECT 1
        FROM INFORMATION_SCHEMA.TABLES
        WHERE table_name = #{tableName}
        AND TABLE_SCHEMA = #{dbName}
        ) AS table_exists
    </select>
    <select id="getTableListLike" resultType="java.lang.String">
            select
            table_name
            from `INFORMATION_SCHEMA`.`TABLES`
            select distinct table_name
            from INFORMATION_SCHEMA.TABLES
            where TABLE_SCHEMA = #{dbName}
            and table_name like concat(#{tableLike},'%')
    </select>