update 优化 代码生成表导入 排除工作流相关表

2.X
疯狂的狮子Li 9 months ago
parent 7a7404d11a
commit 1bf79e032e

@ -19,7 +19,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select table_name, table_comment, create_time, update_time
from information_schema.tables
where table_schema = (select database())
AND table_name NOT LIKE 'xxl_job_%' AND table_name NOT LIKE 'gen_%'
AND table_name NOT LIKE 'pj_%' AND table_name NOT LIKE 'gen_%'
AND table_name NOT LIKE 'act_%' AND table_name NOT LIKE 'flw_%'
<if test="genTable.params.genTableNames != null and genTable.params.genTableNames.size > 0">
AND table_name NOT IN
<foreach collection="genTable.params.genTableNames" open="(" close=")" separator="," item="item">
@ -40,7 +41,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where dt.table_name = dtc.table_name
and dt.table_name = uo.object_name
and uo.object_type = 'TABLE'
AND dt.table_name NOT LIKE 'XXL_JOB_%' AND dt.table_name NOT LIKE 'GEN_%'
AND dt.table_name NOT LIKE 'pj_%' AND dt.table_name NOT LIKE 'GEN_%'
AND dt.table_name NOT LIKE 'act_%' AND dt.table_name NOT LIKE 'flw_%'
<if test="genTable.params.genTableNames != null and genTable.params.genTableNames.size > 0">
AND lower(dt.table_name) NOT IN
<foreach collection="genTable.params.genTableNames" open="(" close=")" separator="," item="item">
@ -69,7 +71,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND n.nspname = 'public'::name
AND n.nspname <![CDATA[ <> ]]> ''::name
) list_table
where table_name NOT LIKE 'xxl_job_%' AND table_name NOT LIKE 'gen_%'
where table_name NOT LIKE 'pj_%' AND table_name NOT LIKE 'gen_%'
AND table_name NOT LIKE 'act_%' AND table_name NOT LIKE 'flw_%'
<if test="genTable.params.genTableNames != null and genTable.params.genTableNames.size > 0">
AND table_name NOT IN
<foreach collection="genTable.params.genTableNames" open="(" close=")" separator="," item="item">
@ -89,7 +92,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDbTableListByNames" resultMap="GenTableResult">
<if test="@org.dromara.common.mybatis.helper.DataBaseHelper@isMySql()">
select table_name, table_comment, create_time, update_time from information_schema.tables
where table_name NOT LIKE 'xxl_job_%' and table_name NOT LIKE 'gen_%' and table_schema = (select database())
where table_schema = (select database())
and table_name NOT LIKE 'pj_%' and table_name NOT LIKE 'gen_%'
and table_name NOT LIKE 'act_%' AND table_name NOT LIKE 'flw_%'
and table_name in
<foreach collection="array" item="name" open="(" separator="," close=")">
#{name}
@ -101,7 +106,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where dt.table_name = dtc.table_name
and dt.table_name = uo.object_name
and uo.object_type = 'TABLE'
AND dt.table_name NOT LIKE 'XXL_JOB_%' AND dt.table_name NOT LIKE 'GEN_%'
and dt.table_name NOT LIKE 'pj_%' AND dt.table_name NOT LIKE 'GEN_%'
and dt.table_name NOT LIKE 'act_%' AND dt.table_name NOT LIKE 'flw_%'
and lower(dt.table_name) in
<foreach collection="array" item="name" open="(" separator="," close=")">
#{name}
@ -121,7 +127,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND n.nspname = 'public'::name
AND n.nspname <![CDATA[ <> ]]> ''::name
) list_table
where table_name NOT LIKE 'xxl_job_%' and table_name NOT LIKE 'gen_%'
where table_name NOT LIKE 'pj_%' and table_name NOT LIKE 'gen_%'
and table_name NOT LIKE 'act_%' and table_name NOT LIKE 'flw_%'
and table_name in
<foreach collection="array" item="name" open="(" separator="," close=")">
#{name}
@ -132,7 +139,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectTableByName" parameterType="String" resultMap="GenTableResult">
<if test="@org.dromara.common.mybatis.helper.DataBaseHelper@isMySql()">
select table_name, table_comment, create_time, update_time from information_schema.tables
where table_name NOT LIKE 'xxl_job_%' and table_name NOT LIKE 'gen_%' and table_schema = (select database())
where table_schema = (select database())
and table_name NOT LIKE 'pj_%' and table_name NOT LIKE 'gen_%'
and table_name NOT LIKE 'act_%' AND table_name NOT LIKE 'flw_%'
and table_name = #{tableName}
</if>
<if test="@org.dromara.common.mybatis.helper.DataBaseHelper@isOracle()">
@ -141,7 +150,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where dt.table_name = dtc.table_name
and dt.table_name = uo.object_name
and uo.object_type = 'TABLE'
AND dt.table_name NOT LIKE 'XXL_JOB_%' AND dt.table_name NOT LIKE 'GEN_%'
AND dt.table_name NOT LIKE 'pj_%' AND dt.table_name NOT LIKE 'GEN_%'
AND dt.table_name NOT LIKE 'act_%' AND dt.table_name NOT LIKE 'flw_%'
AND dt.table_name NOT IN (select table_name from gen_table)
and lower(dt.table_name) = #{tableName}
</if>
@ -159,7 +169,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND n.nspname = 'public'::name
AND n.nspname <![CDATA[ <> ]]> ''::name
) list_table
where table_name NOT LIKE 'xxl_job_%' and table_name NOT LIKE 'gen_%'
where table_name NOT LIKE 'pj_%' and table_name NOT LIKE 'gen_%'
and table_name NOT LIKE 'act_%' and table_name NOT LIKE 'flw_%'
and table_name = #{tableName}
</if>
</select>

Loading…
Cancel
Save