出库部分

This commit is contained in:
张怡蓉
2025-05-23 13:58:55 +08:00
parent 1f61c0c84a
commit d128105ea7
38 changed files with 5033 additions and 22 deletions

View File

@@ -55,7 +55,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
FROM
sys.columns c
INNER JOIN
sys.tables t ON c.object_id = t.object_id
(SELECT object_id, name FROM sys.tables
UNION ALL
SELECT object_id, name FROM sys.views) t ON c.object_id = t.object_id
LEFT JOIN
sys.types ty ON c.user_type_id = ty.user_type_id
LEFT JOIN (

View File

@@ -77,7 +77,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectDbTableList" parameterType="GenTable" resultMap="GenTableResult">
select t.name as table_name, ISNULL(ep.value, '') AS table_comment, create_date as create_time, modify_date as update_time from sys.tables t
select t.name as table_name, ISNULL(ep.value, '') AS table_comment, create_date as create_time, modify_date as update_time
from (
select name, object_id, create_date, modify_date from sys.tables
union all
select name, object_id, create_date, modify_date from sys.views
) t
LEFT JOIN
sys.extended_properties ep ON ep.major_id = t.object_id AND ep.minor_id = 0 -- 表示是对整个表的注释(不是列)
AND ep.name = 'MS_Description' -- 标准注释名称
@@ -98,7 +103,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectDbTableListByNames" resultMap="GenTableResult">
select t.name as table_name, ISNULL(ep.value, '') AS table_comment, create_date as create_time, modify_date as update_time from sys.tables t
select t.name as table_name, ISNULL(ep.value, '') AS table_comment, create_date as create_time, modify_date as update_time
from (
select name, object_id, create_date, modify_date from sys.tables
union all
select name, object_id, create_date, modify_date from sys.views
) t
LEFT JOIN
sys.extended_properties ep ON ep.major_id = t.object_id AND ep.minor_id = 0 -- 表示是对整个表的注释(不是列)
AND ep.name = 'MS_Description' -- 标准注释名称