From c0d9ca32551aac1d1328c84cce2e37f2c915b32b Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期五, 17 三月 2023 14:38:58 +0800
Subject: [PATCH] 1

---
 ExportMap/db/PublishHelper.cs  |   16 ++++++++
 ExportMap/Models/SysPublish.cs |   44 ++++++++++++++++++++++
 ExportMap/ExportMap.csproj     |    2 +
 ExportMap/Models/XYZArgs.cs    |    5 ++
 ExportMap/export.html          |   10 ++--
 5 files changed, 72 insertions(+), 5 deletions(-)

diff --git a/ExportMap/ExportMap.csproj b/ExportMap/ExportMap.csproj
index 4369faa..334f4fe 100644
--- a/ExportMap/ExportMap.csproj
+++ b/ExportMap/ExportMap.csproj
@@ -144,6 +144,7 @@
     <Compile Include="cs\XYZUtils.cs" />
     <Compile Include="db\ModelHandler.cs" />
     <Compile Include="db\PostgreHelper.cs" />
+    <Compile Include="db\PublishHelper.cs" />
     <Compile Include="db\SQLiteHelper.cs" />
     <Compile Include="Global.asax.cs">
       <DependentUpon>Global.asax</DependentUpon>
@@ -154,6 +155,7 @@
     <Compile Include="Models\Secret.cs" />
     <Compile Include="Models\SpatialItem.cs" />
     <Compile Include="Models\SysMeta.cs" />
+    <Compile Include="Models\SysPublish.cs" />
     <Compile Include="Models\XYZArgs.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
   </ItemGroup>
diff --git a/ExportMap/Models/SysPublish.cs b/ExportMap/Models/SysPublish.cs
new file mode 100644
index 0000000..735992c
--- /dev/null
+++ b/ExportMap/Models/SysPublish.cs
@@ -0,0 +1,44 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+
+namespace ExportMap.Models
+{
+    public class SysPublish
+    {
+        public int id { set; get; }
+
+        public string name { set; get; }
+
+        public string url { set; get; }
+
+        public string path { set; get; }
+
+        public string type { set; get; }
+
+        public int status { set; get; }
+
+        public string dirid { set; get; }
+
+        public string depid { set; get; }
+
+        public int min { set; get; }
+
+        public int max { set; get; }
+
+        public string json { set; get; }
+
+        public int create_user { set; get; }
+
+        public DateTime create_time { set; get; }
+
+        public int update_user { set; get; }
+
+        public DateTime update_time { set; get; }
+
+        public string geom { set; get; }
+
+        public string bak { set; get; }
+    }
+}
diff --git a/ExportMap/Models/XYZArgs.cs b/ExportMap/Models/XYZArgs.cs
index d691106..bf4d051 100644
--- a/ExportMap/Models/XYZArgs.cs
+++ b/ExportMap/Models/XYZArgs.cs
@@ -16,6 +16,11 @@
         }
 
         /// <summary>
+        /// 浠ょ墝
+        /// </summary>
+        public string token { set; get; }
+
+        /// <summary>
         /// 鍦板浘鏈�灏忕骇鍒�
         /// </summary>
         public int min { set; get; }
diff --git a/ExportMap/db/PublishHelper.cs b/ExportMap/db/PublishHelper.cs
new file mode 100644
index 0000000..b6438c4
--- /dev/null
+++ b/ExportMap/db/PublishHelper.cs
@@ -0,0 +1,16 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+
+namespace ExportMap.db
+{
+    public class PublishHelper
+    {
+        private static string insertPublish = "insert into lf.sys_publish(name, url, path, type, status, dirid, depid, min, max, json, create_user, geom, bak) values (@name, @url, @path, @type, @status, @dirid, @depid, @min, @max, @json, @create_user, @geom, @bak)";
+
+        private static string insertMetaPub = "insert into lf.sys_meta_pub (metaid, pubid) select 1, 1 from (select 1) temp where not exists (select 1 from lf.sys_meta_pub where metaid = 1 and pubid = 1)";
+
+
+    }
+}
\ No newline at end of file
diff --git a/ExportMap/export.html b/ExportMap/export.html
index f2c39a0..83167c0 100644
--- a/ExportMap/export.html
+++ b/ExportMap/export.html
@@ -77,7 +77,7 @@
 
     // 娴嬭瘯鍒囧浘
     function convertXYZ() {
-      var data = { ids: [1526, 1527], id: 1, min: 12, max: 12, dircode: "000305" };
+      var data = { token: token, ids: [1526, 1527], id: 1, min: 12, max: 12, dircode: "000305" };
       ajax("Convert/ToTiles", "POST", JSON.stringify(data), null, null, function (rs) {
         alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result);
         console.log(rs);
@@ -86,7 +86,7 @@
 
     // 娴嬭瘯Rvt
     function convert1() {
-      var data = { ids: [1521] };
+      var data = { token: token, ids: [1521] };
       ajax("Convert/ToTileset", "POST", JSON.stringify(data), null, null, function (rs) {
         alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result);
         console.log(rs);
@@ -95,7 +95,7 @@
 
     // 娴嬭瘯Fbx
     function convert2() {
-      var data = { ids: [1522] };
+      var data = { token: token, ids: [1522] };
       ajax("Convert/ToTileset", "POST", JSON.stringify(data), null, null, function (rs) {
         alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result);
         console.log(rs);
@@ -104,7 +104,7 @@
 
     // 娴嬭瘯Ifc
     function convert3() {
-      var data = { ids: [1528] };
+      var data = { token: token, ids: [1528] };
       ajax("Convert/ToTileset", "POST", JSON.stringify(data), null, null, function (rs) {
         alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result);
         console.log(rs);
@@ -113,7 +113,7 @@
 
     // 娴嬭瘯SG
     function toSG() {
-      var data = { ids: [1523, 1525] };
+      var data = { token: token, ids: [1523, 1525] };
       ajax("Convert/ToSG", "POST", JSON.stringify(data), null, null, function (rs) {
         alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result);
         console.log(rs);

--
Gitblit v1.9.3