feat: 代码生成列表添加是否已配置标记
This commit is contained in:
@@ -26,4 +26,7 @@ public class TablePageVO {
|
|||||||
@Schema(description = "创建时间",example = "2023-08-08 08:08:08")
|
@Schema(description = "创建时间",example = "2023-08-08 08:08:08")
|
||||||
private String createTime;
|
private String createTime;
|
||||||
|
|
||||||
|
@Schema(description="是否已配置")
|
||||||
|
private Integer isConfigured;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,22 +7,24 @@
|
|||||||
<!-- 查询数据库表分页 -->
|
<!-- 查询数据库表分页 -->
|
||||||
<select id="getTablePage" resultType="com.youlai.system.model.vo.TablePageVO">
|
<select id="getTablePage" resultType="com.youlai.system.model.vo.TablePageVO">
|
||||||
SELECT
|
SELECT
|
||||||
TABLE_NAME ,
|
t1.TABLE_NAME ,
|
||||||
TABLE_COMMENT ,
|
t1.TABLE_COMMENT ,
|
||||||
TABLE_COLLATION,
|
t1.TABLE_COLLATION,
|
||||||
ENGINE,
|
t1.ENGINE,
|
||||||
CREATE_TIME
|
t1.CREATE_TIME,
|
||||||
|
CASE WHEN t2.id IS NOT NULL THEN 1 ELSE 0 END AS isConfigured
|
||||||
FROM
|
FROM
|
||||||
information_schema.tables
|
information_schema.tables t1
|
||||||
|
LEFT JOIN gen_config t2 on t1.TABLE_NAME = t2.table_name
|
||||||
WHERE
|
WHERE
|
||||||
TABLE_SCHEMA = (SELECT DATABASE())
|
t1.TABLE_SCHEMA = (SELECT DATABASE())
|
||||||
AND table_type = 'BASE TABLE'
|
AND t1.table_type = 'BASE TABLE'
|
||||||
<if test="queryParams.keywords != null and queryParams.keywords.trim() neq ''">
|
<if test="queryParams.keywords != null and queryParams.keywords.trim() neq ''">
|
||||||
AND TABLE_NAME LIKE CONCAT('%',#{queryParams.keywords},'%')
|
AND t1.TABLE_NAME LIKE CONCAT('%',#{queryParams.keywords},'%')
|
||||||
</if>
|
</if>
|
||||||
<!-- 排除的表 -->
|
<!-- 排除的表 -->
|
||||||
<if test="queryParams.excludeTables != null and queryParams.excludeTables.size() > 0">
|
<if test="queryParams.excludeTables != null and queryParams.excludeTables.size() > 0">
|
||||||
AND TABLE_NAME NOT IN
|
AND t1.TABLE_NAME NOT IN
|
||||||
<foreach collection="queryParams.excludeTables" item="excludeTable" open="(" close=")" separator=",">
|
<foreach collection="queryParams.excludeTables" item="excludeTable" open="(" close=")" separator=",">
|
||||||
#{excludeTable}
|
#{excludeTable}
|
||||||
</foreach>
|
</foreach>
|
||||||
|
|||||||
Reference in New Issue
Block a user