作者 RuoYi

优化查表特殊字符使用反斜杠进行转义

@@ -26,7 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -26,7 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
26 <result property="updateBy" column="update_by" /> 26 <result property="updateBy" column="update_by" />
27 <result property="updateTime" column="update_time" /> 27 <result property="updateTime" column="update_time" />
28 <result property="remark" column="remark" /> 28 <result property="remark" column="remark" />
29 - <collection property="columns" javaType="java.util.List" resultMap="GenTableColumnResult" /> 29 + <collection property="columns" javaType="java.util.List" resultMap="GenTableColumnResult" />
30 </resultMap> 30 </resultMap>
31 31
32 <resultMap type="GenTableColumn" id="GenTableColumnResult"> 32 <resultMap type="GenTableColumn" id="GenTableColumnResult">
@@ -79,7 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -79,7 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
79 <select id="selectDbTableList" parameterType="GenTable" resultMap="GenTableResult"> 79 <select id="selectDbTableList" parameterType="GenTable" resultMap="GenTableResult">
80 select table_name, table_comment, create_time, update_time from information_schema.tables 80 select table_name, table_comment, create_time, update_time from information_schema.tables
81 where table_schema = (select database()) 81 where table_schema = (select database())
82 - AND table_name NOT LIKE 'qrtz_%' AND table_name NOT LIKE 'gen_%' 82 + AND table_name NOT LIKE 'qrtz\_%' AND table_name NOT LIKE 'gen\_%'
83 AND table_name NOT IN (select table_name from gen_table) 83 AND table_name NOT IN (select table_name from gen_table)
84 <if test="tableName != null and tableName != ''"> 84 <if test="tableName != null and tableName != ''">
85 AND lower(table_name) like lower(concat('%', #{tableName}, '%')) 85 AND lower(table_name) like lower(concat('%', #{tableName}, '%'))
@@ -98,7 +98,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -98,7 +98,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
98 98
99 <select id="selectDbTableListByNames" resultMap="GenTableResult"> 99 <select id="selectDbTableListByNames" resultMap="GenTableResult">
100 select table_name, table_comment, create_time, update_time from information_schema.tables 100 select table_name, table_comment, create_time, update_time from information_schema.tables
101 - where table_name NOT LIKE 'qrtz_%' and table_name NOT LIKE 'gen_%' and table_schema = (select database()) 101 + where table_name NOT LIKE 'qrtz\_%' and table_name NOT LIKE 'gen\_%' and table_schema = (select database())
102 and table_name in 102 and table_name in
103 <foreach collection="array" item="name" open="(" separator="," close=")"> 103 <foreach collection="array" item="name" open="(" separator="," close=")">
104 #{name} 104 #{name}