|
@@ -41,15 +41,20 @@
|
|
|
|
|
|
|
|
|
<select id="dmTableInfoList" resultType="com.ruoyi.system.entity.vo.TableInfoVO">
|
|
|
- select a.object_name as tableName,b.comment$ as tableComment,a.created as createTime
|
|
|
+ select a.object_name as tableName,
|
|
|
+ b.comment$ as tableComment,
|
|
|
+ a.created as createTime
|
|
|
from dba_objects a
|
|
|
- left join SYSTABLECOMMENTS b on b.tvname = a.object_name
|
|
|
- where a.object_type = 'TABLE' and a.owner = #{databaseName}
|
|
|
+ left join SYSTABLECOMMENTS b
|
|
|
+ on b.tvname = a.object_name and a.owner = b.schname
|
|
|
+ where a.object_type = 'TABLE'
|
|
|
+ and a.owner = #{databaseName}
|
|
|
<if test="map.tableName != null and map.tableName != ''">and a.object_name like concat('%', #{map.tableName},
|
|
|
'%')
|
|
|
</if>
|
|
|
<if test="map.tableComment != null and map.tableComment !=''">and b.comment$ like concat('%',
|
|
|
#{map.tableComment}, '%')
|
|
|
+
|
|
|
</if>
|
|
|
order by createTime asc
|
|
|
</select>
|