From 0d2a53a9fb0299b3536bce0459de7bbc9e766c16 Mon Sep 17 00:00:00 2001 From: itzhang <2019326567@qq.com> Date: Sat, 7 Jun 2025 11:57:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=99=BA=E6=B4=8B=E6=9C=80=E6=96=B0=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/magic-api/api/日志/group.json | 14 +++ data/magic-api/api/日志/新增日志.ms | 46 ++++++++++ data/magic-api/api/日志/查询日志.ms | 137 ++++++++++++++++++++++++++++ data/magic-api/datasource/日志.json | 19 ++++ 4 files changed, 216 insertions(+) create mode 100644 data/magic-api/api/日志/group.json create mode 100644 data/magic-api/api/日志/新增日志.ms create mode 100644 data/magic-api/api/日志/查询日志.ms create mode 100644 data/magic-api/datasource/日志.json diff --git a/data/magic-api/api/日志/group.json b/data/magic-api/api/日志/group.json new file mode 100644 index 0000000..2f2c423 --- /dev/null +++ b/data/magic-api/api/日志/group.json @@ -0,0 +1,14 @@ +{ + "properties" : { }, + "id" : "55b38df92caf40b99b60fcc88e5ce361", + "name" : "日志", + "type" : "api", + "parentId" : "0", + "path" : "Log", + "createTime" : 1742981192694, + "updateTime" : null, + "createBy" : null, + "updateBy" : null, + "paths" : [ ], + "options" : [ ] +} \ 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..8b936a8 --- /dev/null +++ b/data/magic-api/api/日志/新增日志.ms @@ -0,0 +1,46 @@ +{ + "properties" : { }, + "id" : "0ed26502b95049db8e00316c785c24c3", + "script" : null, + "groupId" : "55b38df92caf40b99b60fcc88e5ce361", + "name" : "新增日志", + "createTime" : 1743045862791, + "updateTime" : null, + "lock" : null, + "createBy" : null, + "updateBy" : null, + "path" : "/insert/log_data", + "method" : "POST", + "parameters" : [ ], + "options" : [ ], + "requestBody" : null, + "headers" : [ ], + "paths" : [ ], + "responseBody" : null, + "description" : null, + "requestBodyDefinition" : null, + "responseBodyDefinition" : null +} +================================ +return db.Log.insert(""" + +insert into ${body.tableName} ( + log_id, + log_type, + log_status, + syn_type, + data_id, + data_name, + mark, + res_body, + mark_id, + send_url, + send_body, + send_res, + send_flag, + send_memo) +values +(#{body.log_id},#{body.log_type},#{body.log_status},#{body.syn_type},#{body.data_id},#{body.data_name},#{body.mark},#{body.res_body},#{body.mark_id}, +#{body.send_url},#{body.send_body},#{body.send_res},#{body.send_flag},#{body.send_memo}) + +""") \ 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..0384b88 --- /dev/null +++ b/data/magic-api/api/日志/查询日志.ms @@ -0,0 +1,137 @@ +{ + "properties" : { }, + "id" : "89c69bcd049d47228b3298cf0e318756", + "script" : null, + "groupId" : "55b38df92caf40b99b60fcc88e5ce361", + "name" : "查询日志", + "createTime" : null, + "updateTime" : 1743053927684, + "lock" : null, + "createBy" : null, + "updateBy" : null, + "path" : "/query/log_data", + "method" : "GET", + "parameters" : [ { + "name" : "table", + "value" : "send_log_bmxx", + "description" : null, + "required" : true, + "dataType" : "String", + "type" : null, + "defaultValue" : null, + "validateType" : null, + "error" : null, + "expression" : null, + "children" : null + }, { + "name" : "dataId", + "value" : "1", + "description" : null, + "required" : false, + "dataType" : "String", + "type" : null, + "defaultValue" : null, + "validateType" : null, + "error" : null, + "expression" : null, + "children" : null + }, { + "name" : "mark", + "value" : "1", + "description" : null, + "required" : false, + "dataType" : "String", + "type" : null, + "defaultValue" : null, + "validateType" : null, + "error" : null, + "expression" : null, + "children" : null + } ], + "options" : [ ], + "requestBody" : "", + "headers" : [ ], + "paths" : [ ], + "responseBody" : "{\n \"code\": 200,\n \"message\": \"success\",\n \"data\": [],\n \"timestamp\": 1742981566687,\n \"executeTime\": 79\n}", + "description" : null, + "requestBodyDefinition" : null, + "responseBodyDefinition" : { + "name" : "", + "value" : "", + "description" : "", + "required" : false, + "dataType" : "Object", + "type" : null, + "defaultValue" : null, + "validateType" : "", + "error" : "", + "expression" : "", + "children" : [ { + "name" : "code", + "value" : "200", + "description" : "", + "required" : false, + "dataType" : "Integer", + "type" : null, + "defaultValue" : null, + "validateType" : "", + "error" : "", + "expression" : "", + "children" : [ ] + }, { + "name" : "message", + "value" : "success", + "description" : "", + "required" : false, + "dataType" : "String", + "type" : null, + "defaultValue" : null, + "validateType" : "", + "error" : "", + "expression" : "", + "children" : [ ] + }, { + "name" : "data", + "value" : "", + "description" : "", + "required" : false, + "dataType" : "Object", + "type" : null, + "defaultValue" : null, + "validateType" : "", + "error" : "", + "expression" : "", + "children" : [ ] + }, { + "name" : "timestamp", + "value" : "1742981566687", + "description" : "", + "required" : false, + "dataType" : "Long", + "type" : null, + "defaultValue" : null, + "validateType" : "", + "error" : "", + "expression" : "", + "children" : [ ] + }, { + "name" : "executeTime", + "value" : "79", + "description" : "", + "required" : false, + "dataType" : "Integer", + "type" : null, + "defaultValue" : null, + "validateType" : "", + "error" : "", + "expression" : "", + "children" : [ ] + } ] + } +} +================================ +return db.Log.select(""" + +select * from ${table} where log_type = #{log_type} and data_id = #{dataId} and mark = #{mark} + +""") \ No newline at end of file diff --git a/data/magic-api/datasource/日志.json b/data/magic-api/datasource/日志.json new file mode 100644 index 0000000..20c71d6 --- /dev/null +++ b/data/magic-api/datasource/日志.json @@ -0,0 +1,19 @@ +{ + "properties" : { }, + "id" : "3e3ba03a77b943eb85e4c528916e3586", + "script" : null, + "groupId" : "datasource:0", + "name" : "日志", + "createTime" : 1742981169023, + "updateTime" : null, + "lock" : null, + "createBy" : null, + "updateBy" : null, + "url" : "jdbc:mysql://116.204.34.35:13300/zycx", + "username" : "root", + "password" : "root", + "key" : "Log", + "maxRows" : -1, + "driverClassName" : "com.mysql.cj.jdbc.Driver", + "type" : "com.alibaba.druid.pool.DruidDataSource" +} \ No newline at end of file