From dbcf22865fea062e9a311a69ccaee0b12c51c8de Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期四, 16 三月 2023 17:41:39 +0800
Subject: [PATCH] 1

---
 ExportMap/cs/SGUtils.cs                    |   15 ++++++++++++++-
 ExportMap/cs/XYZUtils.cs                   |    2 +-
 ExportMap/Controllers/ConvertController.cs |   16 ++++++++++++++--
 3 files changed, 29 insertions(+), 4 deletions(-)

diff --git a/ExportMap/Controllers/ConvertController.cs b/ExportMap/Controllers/ConvertController.cs
index 38299cb..44f21f1 100644
--- a/ExportMap/Controllers/ConvertController.cs
+++ b/ExportMap/Controllers/ConvertController.cs
@@ -25,6 +25,10 @@
                 }
 
                 int count = ConvertUtils.Convert(args.ids);
+                if (0 == count)
+                {
+                    return ResponseMsg<int>.fail("澶辫触");
+                }
 
                 return ResponseMsg<int>.success("鎴愬姛", count);
             }
@@ -56,7 +60,7 @@
                 int count = XYZUtils.Generate(args, ref err);
                 if (0 == count)
                 {
-                    return ResponseMsg<int>.fail(null == err ? "鐢熸垚澶辫触" : err);
+                    return ResponseMsg<int>.fail(null == err ? "澶辫触" : err);
                 }
 
                 return ResponseMsg<int>.success("鎴愬姛", count);
@@ -76,8 +80,16 @@
         {
             try
             {
+                if (null == args || null == args.ids || args.ids.Count == 0)
+                {
+                    return ResponseMsg<int>.fail("璇疯緭鍏ュ厓鏁版嵁ID");
+                }
 
-                int count = 0;
+                int count = SGUtils.Release(args);
+                if (0 == count)
+                {
+                    return ResponseMsg<int>.fail("澶辫触");
+                }
 
                 return ResponseMsg<int>.success("鎴愬姛", count);
             }
diff --git a/ExportMap/cs/SGUtils.cs b/ExportMap/cs/SGUtils.cs
index df8e3f7..cd91cb2 100644
--- a/ExportMap/cs/SGUtils.cs
+++ b/ExportMap/cs/SGUtils.cs
@@ -1,4 +1,5 @@
-锘縰sing System;
+锘縰sing ExportMap.Models;
+using System;
 using System.Collections.Generic;
 using System.Configuration;
 using System.Linq;
@@ -51,5 +52,17 @@
                 return ConfigurationManager.AppSettings["sgDB"];
             }
         }
+
+        /// <summary>
+        /// 鍙戝竷鏁版嵁
+        /// </summary>
+        /// <param name="args">XYZ鍙傛暟</param>
+        /// <returns>琛屾暟</returns>
+        public static int Release(XYZArgs args)
+        {
+
+
+            return 0;
+        }
     }
 }
diff --git a/ExportMap/cs/XYZUtils.cs b/ExportMap/cs/XYZUtils.cs
index 02686f6..6925f58 100644
--- a/ExportMap/cs/XYZUtils.cs
+++ b/ExportMap/cs/XYZUtils.cs
@@ -80,7 +80,7 @@
 
             string viewFile = Path.Combine(xyzPath, "view.html");
 
-            return File.Exists(viewFile) ? id : 0;
+            return File.Exists(viewFile) ? 1 : 0;
         }
 
         /// <summary>

--
Gitblit v1.9.3