From f4c25e70497a233caba9e208c13f1b663bf0623f Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期六, 29 七月 2023 18:30:38 +0800 Subject: [PATCH] 删除服务时物理删除发布文件 --- ExportMap/db/PubDBHelper.cs | 18 +++++++++++++++--- 1 files changed, 15 insertions(+), 3 deletions(-) diff --git a/ExportMap/db/PubDBHelper.cs b/ExportMap/db/PubDBHelper.cs index bc1ffca..1b0703a 100644 --- a/ExportMap/db/PubDBHelper.cs +++ b/ExportMap/db/PubDBHelper.cs @@ -98,10 +98,10 @@ /// <summary> /// 鏇存柊鍙戝竷鏁版嵁鐨勫潗鏍� /// </summary> - public static int UpdatePublishCoord(int pid, string json) + public static int UpdatePublishGeom(int pid, string geom) { - string sql = string.Format("update lf.sys_publish set json = @json where id = {0}", pid); - DbParameter dp = new NpgsqlParameter("@json", json); + string sql = string.Format("update lf.sys_publish set geom = @geom where id = {0}", pid); + DbParameter dp = new NpgsqlParameter("@geom", geom); return Tools.DBHelper.ExecuteNonQuery(sql, dp); } @@ -275,6 +275,18 @@ } /// <summary> + /// 鏌ヨ鍙戝竷鏁版嵁 + /// </summary> + public static List<SysPublish> SelectPublishs(List<int> ids) + { + string sql = string.Format("select id, name, url, path, type, status, dirid, depid, min, max, json, create_user, create_time, update_user, update_time, st_astext(geom) geom, bak from lf.sys_publish where id in ({0}) order by id desc", string.Join(",", ids)); + DataTable dt = Tools.DBHelper.GetDataTable(sql); + List<SysPublish> list = ModelHandler.FillModel<SysPublish>(dt); + + return list; + } + + /// <summary> /// 鑾峰彇鍙傛暟鍒楄〃 /// </summary> public static List<DbParameter> GetParams<T>(string sql, T t) -- Gitblit v1.9.3