<?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>
|