From be379ab0bf3acc85c135ceba5e6a0ce99c7bd58d Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周五, 04 4月 2025 15:54:07 +0800
Subject: [PATCH] 优化 修复检测bug

---
 Api/AuthorizeFile/licwms/DevLicense_LA23042_20250403114713.json |    4 ++++
 Api/Util/AuthorizeHelper.cs                                     |    7 ++++++-
 Api/Dto/ValidateLicenseInput.cs                                 |    7 ++++++-
 3 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/Api/AuthorizeFile/licwms/DevLicense_LA23042_20250403114713.json b/Api/AuthorizeFile/licwms/DevLicense_LA23042_20250403114713.json
new file mode 100644
index 0000000..953a625
--- /dev/null
+++ b/Api/AuthorizeFile/licwms/DevLicense_LA23042_20250403114713.json
@@ -0,0 +1,4 @@
+{
+  "LicenseData": "WZ7UY415L8zvhzlSMT7xcaKyNrYGDsazZWngC\u002BOpPoO6W1hscH5qdO6jwh38DT0ALHmTQAno9A4vz2/8LlPEzD4RpXOMPiwUL7CJdfhnaPKYntx57wSbiRCxrFJ9yTsOWx73l3IrLdxLuBvCEhOhlcOWCX8bsPXUYaPraKP1twI=",
+  "Signature": "tMf\u002BVuxwKPwDzAE8n\u002B5ETkflqiyMjdguVHeqQNp\u002Bpts="
+}
\ No newline at end of file
diff --git a/Api/Dto/ValidateLicenseInput.cs b/Api/Dto/ValidateLicenseInput.cs
index 6fa2e41..80b10f7 100644
--- a/Api/Dto/ValidateLicenseInput.cs
+++ b/Api/Dto/ValidateLicenseInput.cs
@@ -3,8 +3,13 @@
     public class ValidateLicenseInput
     {
         /// <summary>
-        /// 棰勮澶╂暟閰嶇疆
+        /// 棰勮澶╂暟閰嶇疆(閫夊~)
         /// </summary>
         public int? WaringDays { get; set; }
+
+        /// <summary>
+        /// 鎺堟潈鏂囦欢澶瑰悕(閫夊~)
+        /// </summary>
+        public string? LicenseFolerName { get; set; }
     }
 }
diff --git a/Api/Util/AuthorizeHelper.cs b/Api/Util/AuthorizeHelper.cs
index b59e150..a97c2b9 100644
--- a/Api/Util/AuthorizeHelper.cs
+++ b/Api/Util/AuthorizeHelper.cs
@@ -17,11 +17,16 @@
         {
             try
             {
+                var licenseFolerName = input.LicenseFolerName;
+                if (string.IsNullOrEmpty(licenseFolerName))
+                {
+                    licenseFolerName = "lic";
+                }
                 //1銆佽幏鍙杕ac鍦板潃
                 var macAddresses = EnDecode.GetAllMacAddresses();
                 //2銆佹壘鍒� 鎺堟潈鏂囦欢
                 string baseDir = AppDomain.CurrentDomain.BaseDirectory;
-                DirectoryInfo theFolder = new DirectoryInfo(baseDir + @"\\AuthorizeFile\\lic");
+                DirectoryInfo theFolder = new DirectoryInfo(baseDir + @"\\AuthorizeFile\\" + licenseFolerName);
                 //閬嶅巻鏂囦欢,璇诲彇绗竴涓枃浠�
                 var files = theFolder.GetFiles();
                 if (files.Length == 0)

--
Gitblit v1.9.3