|
@@ -94,27 +94,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</select>
|
|
|
|
|
|
<select id="selectDbTableList" parameterType="GenTable" resultMap="GenTableResult">
|
|
|
- select table_name, table_comment, create_time, update_time from information_schema.tables
|
|
|
- where table_schema = (select database())
|
|
|
- AND table_name NOT LIKE 'qrtz_%' AND table_name NOT LIKE 'gen_%'
|
|
|
- AND table_name NOT IN (select table_name from gen_table)
|
|
|
- <if test="tableName != null and tableName != ''">
|
|
|
- AND lower(table_name) like lower(concat('%', #{tableName}, '%'))
|
|
|
- </if>
|
|
|
- <if test="tableComment != null and tableComment != ''">
|
|
|
- AND lower(table_comment) like lower(concat('%', #{tableComment}, '%'))
|
|
|
- </if>
|
|
|
- <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
|
|
- AND date_format(create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
|
|
- </if>
|
|
|
- <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
|
|
- AND date_format(create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
|
|
- </if>
|
|
|
+ SELECT
|
|
|
+ table_name,
|
|
|
+ table_comment,
|
|
|
+ create_time,
|
|
|
+ update_time
|
|
|
+ FROM
|
|
|
+ information_schema. TABLES
|
|
|
+ WHERE
|
|
|
+ table_schema = (SELECT DATABASE())
|
|
|
+ AND table_name NOT LIKE 'qrtz_%'
|
|
|
</select>
|
|
|
|
|
|
<select id="selectDbTableListByNames" resultMap="GenTableResult">
|
|
|
select table_name, table_comment, create_time, update_time from information_schema.tables
|
|
|
- where table_name NOT LIKE 'qrtz_%' and table_name NOT LIKE 'gen_%' and table_schema = (select database())
|
|
|
+ where table_schema = (select database())
|
|
|
and table_name in
|
|
|
<foreach collection="array" item="name" open="(" separator="," close=")">
|
|
|
#{name}
|