From dc80260b8d31bb0559d5f6f745b02e2b8fabb88b Mon Sep 17 00:00:00 2001 From: zegezy <1098696801@qq.com> Date: Sat, 9 Mar 2024 22:08:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=BB=84=E4=BB=B6=E5=8E=86?= =?UTF-8?q?=E5=8F=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/magic-api/api/系统管理/组件/组件历史.ms | 5 +-- .../api/系统管理/组件/获取最后一版代码.ms | 32 +++++++++++++++++++ 2 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 data/magic-api/api/系统管理/组件/获取最后一版代码.ms diff --git a/data/magic-api/api/系统管理/组件/组件历史.ms b/data/magic-api/api/系统管理/组件/组件历史.ms index f46dbe4..509eef2 100644 --- a/data/magic-api/api/系统管理/组件/组件历史.ms +++ b/data/magic-api/api/系统管理/组件/组件历史.ms @@ -5,7 +5,7 @@ "groupId" : "6f106ebdee21489db34b956f7770ff03", "name" : "组件历史", "createTime" : null, - "updateTime" : 1709803968033, + "updateTime" : 1709965399273, "lock" : null, "createBy" : null, "updateBy" : null, @@ -26,7 +26,8 @@ return db.page(""" select id, create_date, - (select username from sys_user where id = sdch.create_by) createBy + (select username from sys_user where id = sdch.create_by) create_by from sys_dynamic_component_history sdch where component_id = #{componentId} + order by create_date desc """) \ No newline at end of file diff --git a/data/magic-api/api/系统管理/组件/获取最后一版代码.ms b/data/magic-api/api/系统管理/组件/获取最后一版代码.ms new file mode 100644 index 0000000..1bfaf1d --- /dev/null +++ b/data/magic-api/api/系统管理/组件/获取最后一版代码.ms @@ -0,0 +1,32 @@ +{ + "properties" : { }, + "id" : "530c445f0e69494581d1420cd5311440", + "script" : null, + "groupId" : "6f106ebdee21489db34b956f7770ff03", + "name" : "获取最后一版代码", + "createTime" : null, + "updateTime" : 1709964701024, + "lock" : null, + "createBy" : null, + "updateBy" : null, + "path" : "/getLastCode", + "method" : "GET", + "parameters" : [ ], + "options" : [ ], + "requestBody" : "", + "headers" : [ ], + "paths" : [ ], + "responseBody" : null, + "description" : null, + "requestBodyDefinition" : null, + "responseBodyDefinition" : null +} +================================ +return db.selectOne(""" + select + source_code, + create_date, + (select username from sys_user where id = sdch.create_by) create_by + from sys_dynamic_component_history sdch where component_id = #{componentId} + order by create_date desc limit 1 +""") \ No newline at end of file