From 8c8404c55a863844cc674a8bedb2cfdb92c1c288 Mon Sep 17 00:00:00 2001
From: 移动系统liao <liaoxujun@qq.com>
Date: 星期六, 08 二月 2025 09:04:32 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master' into cyronghe
---
cylsg/cylsg.redis/EzCoreNetRedisService.cs | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/cylsg/cylsg.redis/EzCoreNetRedisService.cs b/cylsg/cylsg.redis/EzCoreNetRedisService.cs
index 5ce6426..f81b0a7 100644
--- a/cylsg/cylsg.redis/EzCoreNetRedisService.cs
+++ b/cylsg/cylsg.redis/EzCoreNetRedisService.cs
@@ -121,6 +121,22 @@
return re;
}
+
+ public string GetYYYMMddAnd4sn()
+ {
+ string formattedDate = DateTime.Now.ToString("yyyyMMdd");
+
+
+ var sn = Incrby($"CreatYYYMMddAnd4snKey:{formattedDate}");
+ if (sn < 1)
+ {
+ //璁剧疆鏈夋晥鏈熼檺涓�24灏忔椂
+ SetTtl($"CreatYYYMMddAnd4snKey:{formattedDate}", 24 * 60 * 60);
+ }
+ string re = formattedDate + sn.ToString("D4");
+
+ return re;
+ }
/// <summary>
///
/// </summary>
--
Gitblit v1.9.1