管道基础大数据平台系统开发-【CS】-ExportMap
1
13693261870
2023-08-02 a12c2baf8246d0af0e15756b7e008ded544e9b1c
ExportMap/db/PubDBHelper.cs
@@ -31,7 +31,7 @@
        private static string selectLayerSql = "select id from lf.sys_layer where pid = @pid and en_name = @en_name";
        /// <summary>
        /// 是/否发布过
        /// 是/否发布过 *
        /// </summary>
        public static bool IsPublish(int metaid)
        {
@@ -44,7 +44,7 @@
        }
        /// <summary>
        /// 是/否发布过
        /// 是/否发布过 *
        /// </summary>
        public static bool IsPublish(string dirid, string type = "DOM")
        {
@@ -55,6 +55,17 @@
            int count = obj == null ? 0 : Convert.ToInt32(obj);
            return count > 0;
        }
        /// <summary>
        /// 获取发布ID
        /// </summary>
        public static int GetPushlishId(int metaid)
        {
            string sql = string.Format("select pubid from lf.sys_meta_pub where metaid={0} order by id desc limit 1", metaid);
            object obj = Tools.DBHelper.GetScalar(sql);
            return null == obj ? 0 : Convert.ToInt32(obj);
        }
        /// <summary>
@@ -101,7 +112,7 @@
        public static int UpdatePublish(int pubid, string name, int userId, string geom)
        {
            string str = null == geom ? "" : string.Format(", geom={0}", geom);
            string sql = string.Format("update lf.sys_publish set name=@name, update_user=@userId, create_time=now(), update_time=now(){0} where id=@id", str);
            string sql = string.Format("update lf.sys_publish set name=@name, create_time=now(), update_user=@userId, update_time=now(){0} where id=@id", str);
            DbParameter dp1 = new NpgsqlParameter("@name", name);
            DbParameter dp2 = new NpgsqlParameter("@userId", userId);