From 1d67f77e838df88b0223083378fb3381e691b4ae Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周四, 03 4月 2025 08:31:46 +0800
Subject: [PATCH] 优化

---
 Api/Entity/AuthorizeFunRetEntity.cs |   56 +++++++++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 49 insertions(+), 7 deletions(-)

diff --git a/Api/Entity/AuthorizeFunRetEntity.cs b/Api/Entity/AuthorizeFunRetEntity.cs
index d9c0264..f264f58 100644
--- a/Api/Entity/AuthorizeFunRetEntity.cs
+++ b/Api/Entity/AuthorizeFunRetEntity.cs
@@ -35,17 +35,47 @@
         public double? remainingDays { get; set; }
 
         /// <summary>
+        /// 鍒版湡鏃ユ湡
+        /// </summary>
+        public string expiryDate { get; set; }
+
+        /// <summary>
+        /// 鎺堟潈鏃ユ湡
+        /// </summary>
+        public string issueDate { get; set; }
+
+        /// <summary>
+        /// 椤圭洰鍚嶇О
+        /// </summary>
+        public string projectId { get; set; }
+
+        /// <summary>
+        /// 鎺堟潈绫诲瀷
+        /// </summary>
+        public string type { get; set; }
+
+        /// <summary>
+        /// 缁戝畾MAC
+        /// </summary>
+        public string macAddress { get; set; }
+
+        /// <summary>
         /// 杩斿洖鎴愬姛
         /// </summary>
         /// <param name="_resMsg"></param>
         /// <returns></returns>
-        public static AuthorizeFunRetEntity Success(string _resMsg, object _resData = null)
+        public static AuthorizeFunRetEntity Success(string _resMsg, AuthorizeFunRetEntity newFun)
         {
             return new AuthorizeFunRetEntity()
             {
                 result = true,
                 resMsg = _resMsg,
-                resData = _resData
+
+                expiryDate = newFun?.expiryDate,
+                issueDate = newFun?.issueDate,
+                macAddress = newFun?.macAddress,
+                projectId = newFun?.projectId,
+                type = newFun?.type
             };
         }
         /// <summary>
@@ -53,13 +83,19 @@
         /// </summary>
         /// <param name="_resMsg"></param>
         /// <returns></returns>
-        public static AuthorizeFunRetEntity Success(string _resMsg, double _remainingDays)
+        public static AuthorizeFunRetEntity Success(string _resMsg, double _remainingDays, AuthorizeFunRetEntity newFun)
         {
             return new AuthorizeFunRetEntity()
             {
                 result = true,
                 resMsg = _resMsg,
-                remainingDays = _remainingDays
+                remainingDays = Convert.ToDouble(_remainingDays.ToString("0.0")),
+
+                expiryDate = newFun.expiryDate,
+                issueDate = newFun.issueDate,
+                macAddress = newFun.macAddress,
+                projectId = newFun.projectId,
+                type = newFun.type
             };
         }
 
@@ -74,7 +110,7 @@
             {
                 result = true,
                 resMsg = _resMsg,
-                remainingDays = _remainingDays,
+                remainingDays = Convert.ToDouble(_remainingDays.ToString("0.0")),
                 warnMsg = _warnMsg
             };
         }
@@ -99,13 +135,19 @@
         /// </summary>
         /// <param name="_resMsg"></param>
         /// <returns></returns>
-        public static AuthorizeFunRetEntity Fail(string _resMsg, double _remainingDays)
+        public static AuthorizeFunRetEntity Fail(string _resMsg, double _remainingDays, AuthorizeFunRetEntity newFun)
         {
             return new AuthorizeFunRetEntity()
             {
                 result = false,
                 resMsg = _resMsg,
-                remainingDays = _remainingDays
+                remainingDays = Convert.ToDouble(_remainingDays.ToString("0.0")),
+
+                expiryDate = newFun.expiryDate,
+                issueDate = newFun.issueDate,
+                macAddress = newFun.macAddress,
+                projectId = newFun.projectId,
+                type = newFun.type
             };
         }
     }

--
Gitblit v1.9.3