whycxzp
2025-06-11 02ccfc21d5d4f767bbd92ecda89cdfcc3283728c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.whyc.mapper.CommonMapper" >
 
 
    <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>
    <select id="getTableListLike" resultType="java.lang.String">
            select
            table_name
            from `INFORMATION_SCHEMA`.`TABLES`
            where TABLE_SCHEMA = #{dbName}
            and table_name like concat(#{tableLike},'%')
    </select>
 
 
</mapper>