From db08e93569ee28f23bf0406dda112a5e3880b2a9 Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期一, 21 八月 2023 17:54:35 +0800
Subject: [PATCH] 给模型类添加注释

---
 DataLoader/CS/MetaHelper.cs |   27 +++++++++++++++++++++++++++
 1 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/DataLoader/CS/MetaHelper.cs b/DataLoader/CS/MetaHelper.cs
index 825bca7..71edbf5 100644
--- a/DataLoader/CS/MetaHelper.cs
+++ b/DataLoader/CS/MetaHelper.cs
@@ -1,4 +1,5 @@
 锘縰sing DataLoader.Model;
+using Npgsql;
 using System;
 using System.Collections.Generic;
 using System.Data.Common;
@@ -32,5 +33,31 @@
 
             return count;
         }
+
+        /// <summary>
+        /// 鏍规嵁GUID鏌ヨ璺緞
+        /// </summary>
+        public static string GetFilePathByGuid(string guid)
+        {
+            string sql = "select path from lf.sys_meta where guid = @guid limit 1";
+
+            DbParameter dp = new NpgsqlParameter("@guid", guid);
+            object obj = Tools.DBHelper.GetScalar(sql, dp);
+
+            return obj == null ? null : obj.ToString();
+        }
+
+        /// <summary>
+        /// 鏂囦欢鏄�/鍚﹀瓨鍦�
+        /// </summary>
+        public static bool IsFileExists(string guid)
+        {
+            string sql = "select count(*) from lf.sys_meta where guid = @guid";
+
+            DbParameter dp = new NpgsqlParameter("@guid", guid);
+            object obj = Tools.DBHelper.GetScalar(sql, dp);
+
+            return obj != null && Convert.ToInt32(obj) > 0;
+        }
     }
 }

--
Gitblit v1.9.3