From 557c2711a3e103ebc3d0492344eca9730d5e92b2 Mon Sep 17 00:00:00 2001
From: 移动系统liao <liaoxujun@qq.com>
Date: 星期一, 17 二月 2025 10:47:47 +0800
Subject: [PATCH] 增加司机配送单超时处理任务,防止一直不停手机定位信息,

---
 CoreCms.Net.Utility/Extensions/ObjectExtensions.cs |   25 ++++++++++++++++++-------
 1 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/CoreCms.Net.Utility/Extensions/ObjectExtensions.cs b/CoreCms.Net.Utility/Extensions/ObjectExtensions.cs
index ac320a5..9661063 100644
--- a/CoreCms.Net.Utility/Extensions/ObjectExtensions.cs
+++ b/CoreCms.Net.Utility/Extensions/ObjectExtensions.cs
@@ -1,9 +1,9 @@
 锘�/***********************************************************************
- *            Project: CoreCms.Net                                     *
- *                Web: https://CoreCms.Net                             *
- *        ProjectName: 鏍稿績鍐呭绠$悊绯荤粺                                *
- *             Author: 澶х伆鐏�                                          *
- *              Email: JianWeie@163.com                                *
+ *            Project: baifenBinfa.Net                                     *
+ *                Web: https://baifenBinfa.com                             *
+ *        ProjectName: 鐧惧垎鍏垫硶绠$悊绯荤粺                               *
+ *             Author:                                        *
+ *              Email:                               *
  *           Versions: 1.0                                             *
  *         CreateTime: 2020-02-01 17:48:52
  *          NameSpace: CoreCms.Net.Framework.Utility.Extensions
@@ -14,6 +14,7 @@
 
 using System;
 using System.Collections.Generic;
+using System.ComponentModel;
 using System.Text;
 
 namespace CoreCms.Net.Utility.Extensions
@@ -174,8 +175,18 @@
             return thisValue != null && thisValue != DBNull.Value && bool.TryParse(thisValue.ToString(), out result) ? result : result;
         }
 
-
-
+        /// <summary>
+        /// 鑾峰彇鏋氫妇鐨勬爣娉ㄧ殑鍊�
+        /// </summary>
+        /// <typeparam name="T"></typeparam>
+        /// <param name="value"></param>
+        /// <returns></returns>
+        public static string GetDescription(this Enum value) 
+        {
+            var field = value.GetType().GetField(value.ToString());
+            var attributes = (DescriptionAttribute[])field.GetCustomAttributes(typeof(DescriptionAttribute), false);
+            return attributes.Length > 0 ? attributes[0].Description : value.ToString();
+        }
 
     }
 }

--
Gitblit v1.9.1