From 4d2fd40622b5d66adc92909af5f5c553a9895f85 Mon Sep 17 00:00:00 2001 From: ndbs Date: Thu, 8 Dec 2022 10:46:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B8=B8=E7=94=A8=E5=85=AC=E5=85=B1=E7=B1=BB?= =?UTF-8?q?=20=E6=B7=BB=E5=8A=A0=E5=B9=B4=E6=9C=88=E6=97=A5=E5=AD=97?= =?UTF-8?q?=E7=AC=A6=E4=B8=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Learun.Util/Learun.Util/Common/CommonHelper.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Util/Learun.Util/Common/CommonHelper.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Util/Learun.Util/Common/CommonHelper.cs index bfda49b36..1a7db6208 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Util/Learun.Util/Common/CommonHelper.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Util/Learun.Util/Common/CommonHelper.cs @@ -71,6 +71,16 @@ namespace Learun.Util string code = DateTime.Now.ToString("yyyyMMddHHmmss") + strRandom;//形如 return code; } + /// + /// 自动生成编号 年月日 20221207 + /// + /// + public static string StringTime() + { + Random random = new Random(); + string code = DateTime.Now.ToString("yyyyMMdd"); + return code; + } #endregion #region 生成0-9随机数