From fc6dd85a865c4cadae0b9a07d56e2988d2262f10 Mon Sep 17 00:00:00 2001
From: kazelee <1847801760@qq.com>
Date: 星期二, 22 七月 2025 17:28:52 +0800
Subject: [PATCH] 优化数据库事务帮助类 , 查询/日志生成类

---
 swagger.js |  117 ++++++++++++++++++++++++++++++++++------------------------
 1 files changed, 69 insertions(+), 48 deletions(-)

diff --git a/swagger.js b/swagger.js
index aed0f8c..54ad61a 100644
--- a/swagger.js
+++ b/swagger.js
@@ -40,6 +40,27 @@
             }
         });
     },
+
+    setModelDescriptions: function() {
+        $.ajax({
+            type: "get",
+            url: $("#input_baseUrl").val(),
+            dataType: "json",
+            success: function(data) {
+                var modelDesc = data.ModelDesc;
+                // 鍦ㄦā鍨嬪睍绀哄尯鍩熸坊鍔犳弿杩�+                $(".model-box").each(function() {
+                    var modelName = $(this).find(".model-title").text();
+                    if (modelDesc[modelName]) {
+                        $(this).find(".model-description").remove();
+                        $(this).append(
+                            `<div class="model-description">${modelDesc[modelName]}</div>`
+                        );
+                    }
+                });
+            }
+        });
+    },
     _tryTranslate: function (word)
     {
         return this._words[$.trim(word)] !== undefined ? this._words[$.trim(word)] : word;
@@ -54,54 +75,54 @@
 
 /* jshint quotmark: float */
 window.SwaggerTranslator.learn({
-    "Warning: Deprecated": "警告:已过时",
-    "Implementation Notes": "实现备注",
-    "Response Class": "响应类",
-    "Status": "状态",
-    "Parameters": "参数",
-    "Parameter": "参数",
-    "Value": "值",
-    "Description": "描述",
-    "Parameter Type": "参数类型",
-    "Data Type": "数据类型",
-    "Response Messages": "响应消息",
-    "HTTP Status Code": "HTTP 状态码",
-    "Reason": "原因",
-    "Response Model": "响应模型",
-    "Request URL": "请求 URL",
-    "Response Body": "响应体",
-    "Response Code": "响应码",
-    "Response Headers": "响应头",
-    "Hide Response": "隐藏响应",
-    "Headers": "头",
-    "Try it out!": "试一下!",
-    "Show/Hide": "显示/隐藏",
-    "List Operations": "显示操作",
-    "Expand Operations": "展开操作",
-    "Raw": "原始",
-    "can't parse JSON.  Raw result": "无法解析 JSON。原始结果",
-    "Model Schema": "模型架构",
-    "Model": "模型",
-    "apply": "应用",
-    "Username": "用户名",
-    "Password": "密码",
-    "Terms of service": "服务条款",
-    "Created by": "创建者",
-    "See more at": "查看更多:",
-    "Contact the developer": "联系开发者",
-    "api version": "api 版本",
-    "Response Content Type": "响应 Content Type",
-    "fetching resource": "正在获取资源",
-    "fetching resource list": "正在获取资源列表",
-    "Explore": "浏览",
-    "Show Swagger Petstore Example Apis": "显示 Swagger Petstore 示例 Apis",
-    "Can't read from server.  It may not have the appropriate access-control-origin settings.": "无法从服务器读取。可能没有正确设置 access-control-origin。",
-    "Please specify the protocol for": "请指定协议:",
-    "Can't read swagger JSON from": "无法读取 swagger JSON于",
-    "Finished Loading Resource Information. Rendering Swagger UI": "已加载资源信息。正在渲染 Swagger UI",
-    "Unable to read api": "无法读取 api",
-    "from path": "从路径",
-    "server returned": "服务器返回"
+    "Warning: Deprecated": "璀﹀憡:宸茶繃鏃�,
+    "Implementation Notes": "瀹炵幇澶囨敞",
+    "Response Class": "鍝嶅簲绫�,
+    "Status": "鐘舵�",
+    "Parameters": "鍙傛暟",
+    "Parameter": "鍙傛暟",
+    "Value": "鍊�,
+    "Description": "鎻忚堪",
+    "Parameter Type": "鍙傛暟绫诲瀷",
+    "Data Type": "鏁版嵁绫诲瀷",
+    "Response Messages": "鍝嶅簲娑堟伅",
+    "HTTP Status Code": "HTTP 鐘舵�鐮�,
+    "Reason": "鍘熷洜",
+    "Response Model": "鍝嶅簲妯″瀷",
+    "Request URL": "璇锋眰 URL",
+    "Response Body": "鍝嶅簲浣�,
+    "Response Code": "鍝嶅簲鐮�,
+    "Response Headers": "鍝嶅簲澶�,
+    "Hide Response": "闅愯棌鍝嶅簲",
+    "Headers": "澶�,
+    "Try it out!": "璇曚竴涓�",
+    "Show/Hide": "鏄剧ず/闅愯棌",
+    "List Operations": "鏄剧ず鎿嶄綔",
+    "Expand Operations": "灞曞紑鎿嶄綔",
+    "Raw": "鍘熷",
+    "can't parse JSON.  Raw result": "鏃犳硶瑙f瀽 JSON銆傚師濮嬬粨鏋�,
+    "Model Schema": "妯″瀷鏋舵瀯",
+    "Model": "妯″瀷",
+    "apply": "搴旂敤",
+    "Username": "鐢ㄦ埛鍚�,
+    "Password": "瀵嗙爜",
+    "Terms of service": "鏈嶅姟鏉℃",
+    "Created by": "鍒涘缓鑰�,
+    "See more at": "鏌ョ湅鏇村:",
+    "Contact the developer": "鑱旂郴寮�彂鑰�,
+    "api version": "api 鐗堟湰",
+    "Response Content Type": "鍝嶅簲 Content Type",
+    "fetching resource": "姝e湪鑾峰彇璧勬簮",
+    "fetching resource list": "姝e湪鑾峰彇璧勬簮鍒楄〃",
+    "Explore": "娴忚",
+    "Show Swagger Petstore Example Apis": "鏄剧ず Swagger Petstore 绀轰緥 Apis",
+    "Can't read from server.  It may not have the appropriate access-control-origin settings.": "鏃犳硶浠庢湇鍔″櫒璇诲彇銆傚彲鑳芥病鏈夋纭缃�access-control-origin銆�,
+    "Please specify the protocol for": "璇锋寚瀹氬崗璁�",
+    "Can't read swagger JSON from": "鏃犳硶璇诲彇 swagger JSON浜�,
+    "Finished Loading Resource Information. Rendering Swagger UI": "宸插姞杞借祫婧愪俊鎭�姝e湪娓叉煋 Swagger UI",
+    "Unable to read api": "鏃犳硶璇诲彇 api",
+    "from path": "浠庤矾寰�,
+    "server returned": "鏈嶅姟鍣ㄨ繑鍥�
 });
 $(function ()
 {

--
Gitblit v1.9.1