| | |
| | | </resultMap> |
| | | |
| | | <select id="selectPageDbTableList" resultMap="GenTableResult"> |
| | | <if test="@org.ruoyi.common.mybatis.helper.DataBaseHelper@isMySql()"> |
| | | <if test="@org.ruoyi.helper.DataBaseHelper@isMySql()"> |
| | | select table_name, table_comment, create_time, update_time |
| | | from information_schema.tables |
| | | where table_schema = (select database()) |
| | |
| | | </if> |
| | | order by create_time desc |
| | | </if> |
| | | <if test="@org.ruoyi.common.mybatis.helper.DataBaseHelper@isOracle()"> |
| | | <if test="@org.ruoyi.helper.DataBaseHelper@isOracle()"> |
| | | select lower(dt.table_name) as table_name, dtc.comments as table_comment, uo.created as create_time, uo.last_ddl_time as update_time |
| | | from user_tables dt, user_tab_comments dtc, user_objects uo |
| | | where dt.table_name = dtc.table_name |
| | |
| | | </if> |
| | | order by create_time desc |
| | | </if> |
| | | <if test="@org.ruoyi.common.mybatis.helper.DataBaseHelper@isPostgerSql()"> |
| | | <if test="@org.ruoyi.helper.DataBaseHelper@isPostgerSql()"> |
| | | select table_name, table_comment, create_time, update_time |
| | | from ( |
| | | SELECT c.relname AS table_name, |
| | |
| | | </if> |
| | | order by create_time desc |
| | | </if> |
| | | <if test="@org.ruoyi.common.mybatis.helper.DataBaseHelper@isSqlServer()"> |
| | | <if test="@org.ruoyi.helper.DataBaseHelper@isSqlServer()"> |
| | | SELECT cast(D.NAME as nvarchar) as table_name, |
| | | cast(F.VALUE as nvarchar) as table_comment, |
| | | crdate as create_time, |
| | |
| | | </select> |
| | | |
| | | <select id="selectDbTableListByNames" resultMap="GenTableResult"> |
| | | <if test="@org.ruoyi.common.mybatis.helper.DataBaseHelper@isMySql()"> |
| | | <if test="@org.ruoyi.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()) |
| | | and table_name in |
| | |
| | | #{name} |
| | | </foreach> |
| | | </if> |
| | | <if test="@org.ruoyi.common.mybatis.helper.DataBaseHelper@isOracle()"> |
| | | <if test="@org.ruoyi.helper.DataBaseHelper@isOracle()"> |
| | | select lower(dt.table_name) as table_name, dtc.comments as table_comment, uo.created as create_time, uo.last_ddl_time as update_time |
| | | from user_tables dt, user_tab_comments dtc, user_objects uo |
| | | where dt.table_name = dtc.table_name |
| | |
| | | #{name} |
| | | </foreach> |
| | | </if> |
| | | <if test="@org.ruoyi.common.mybatis.helper.DataBaseHelper@isPostgerSql()"> |
| | | <if test="@org.ruoyi.helper.DataBaseHelper@isPostgerSql()"> |
| | | select table_name, table_comment, create_time, update_time |
| | | from ( |
| | | SELECT c.relname AS table_name, |
| | |
| | | #{name} |
| | | </foreach> |
| | | </if> |
| | | <if test="@org.ruoyi.common.mybatis.helper.DataBaseHelper@isSqlServer()"> |
| | | <if test="@org.ruoyi.helper.DataBaseHelper@isSqlServer()"> |
| | | SELECT cast(D.NAME as nvarchar) as table_name, |
| | | cast(F.VALUE as nvarchar) as table_comment, |
| | | crdate as create_time, |
| | |
| | | </select> |
| | | |
| | | <select id="selectTableByName" parameterType="String" resultMap="GenTableResult"> |
| | | <if test="@org.ruoyi.common.mybatis.helper.DataBaseHelper@isMySql()"> |
| | | <if test="@org.ruoyi.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()) |
| | | and table_name = #{tableName} |
| | | </if> |
| | | <if test="@org.ruoyi.common.mybatis.helper.DataBaseHelper@isOracle()"> |
| | | <if test="@org.ruoyi.helper.DataBaseHelper@isOracle()"> |
| | | select lower(dt.table_name) as table_name, dtc.comments as table_comment, uo.created as create_time, uo.last_ddl_time as update_time |
| | | from user_tables dt, user_tab_comments dtc, user_objects uo |
| | | where dt.table_name = dtc.table_name |
| | |
| | | AND dt.table_name NOT IN (select table_name from gen_table) |
| | | and lower(dt.table_name) = #{tableName} |
| | | </if> |
| | | <if test="@org.ruoyi.common.mybatis.helper.DataBaseHelper@isPostgerSql()"> |
| | | <if test="@org.ruoyi.helper.DataBaseHelper@isPostgerSql()"> |
| | | select table_name, table_comment, create_time, update_time |
| | | from ( |
| | | SELECT c.relname AS table_name, |
| | |
| | | where table_name NOT LIKE 'xxl_job_%' and table_name NOT LIKE 'gen_%' |
| | | and table_name = #{tableName} |
| | | </if> |
| | | <if test="@org.ruoyi.common.mybatis.helper.DataBaseHelper@isSqlServer()"> |
| | | <if test="@org.ruoyi.helper.DataBaseHelper@isSqlServer()"> |
| | | SELECT cast(D.NAME as nvarchar) as table_name, |
| | | cast(F.VALUE as nvarchar) as table_comment, |
| | | crdate as create_time, |