From a9d3642f93bdb25b5d72c8e28ee14d66ac7c4ea3 Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期二, 27 六月 2023 17:21:25 +0800
Subject: [PATCH] 将TerraBuilder自动化创建mpt程序包装成Web服务

---
 ExportMap/Controllers/TBController.cs |   14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/ExportMap/Controllers/TBController.cs b/ExportMap/Controllers/TBController.cs
index 65cb8df..a181217 100644
--- a/ExportMap/Controllers/TBController.cs
+++ b/ExportMap/Controllers/TBController.cs
@@ -17,18 +17,16 @@
         {
             try
             {
-                if (string.IsNullOrEmpty(path) || string.IsNullOrEmpty(token))
-                    return ResponseMsg<string>.fail("path鍜宼oken鍙傛暟涓嶈兘涓虹┖");
-                if (!ExportUtil.VerifyToken(token))
-                    return ResponseMsg<string>.fail("浠ょ墝鏃犳晥");
-                if (!Directory.Exists(path))
-                    return ResponseMsg<string>.fail("鏂囦欢璺緞涓嶅瓨鍦�");
+                if (string.IsNullOrEmpty(path) || string.IsNullOrEmpty(token)) return ResponseMsg<string>.fail("path鍜宼oken鍙傛暟涓嶈兘涓虹┖");
+
+                if (!ExportUtil.VerifyToken(token)) return ResponseMsg<string>.fail("浠ょ墝鏃犳晥");
+
+                if (!Directory.Exists(path)) return ResponseMsg<string>.fail("鏂囦欢璺緞涓嶅瓨鍦�");
 
                 string err = null;
                 string rs = TBUtils.CreateMpt(path, ref err);
 
-                if (string.IsNullOrEmpty(rs))
-                    return ResponseMsg<string>.fail(null == err ? "澶辫触" : err);
+                if (string.IsNullOrEmpty(rs)) return ResponseMsg<string>.fail(null == err ? "澶辫触" : err);
 
                 return ResponseMsg<string>.success("鎴愬姛", rs, 1);
             }

--
Gitblit v1.9.3