From 1571dee924ea10cdcb55300cf02f70c6208c0333 Mon Sep 17 00:00:00 2001
From: 移动系统liao <liaoxujun@qq.com>
Date: 星期二, 27 八月 2024 16:37:28 +0800
Subject: [PATCH] 增加人脸验证逻辑,支付接口,和逻辑

---
 cylsg/cylsg.redis/EzCoreNetRedisService.cs |   22 +++++++++++++++++++++-
 1 files changed, 21 insertions(+), 1 deletions(-)

diff --git a/cylsg/cylsg.redis/EzCoreNetRedisService.cs b/cylsg/cylsg.redis/EzCoreNetRedisService.cs
index ba679b1..5137422 100644
--- a/cylsg/cylsg.redis/EzCoreNetRedisService.cs
+++ b/cylsg/cylsg.redis/EzCoreNetRedisService.cs
@@ -1,5 +1,6 @@
 锘縰sing Furion;
 using Furion.DependencyInjection;
+using Microsoft.AspNetCore.DataProtection.KeyManagement;
 using SqlSugar;
 using System;
 using System.Collections.Generic;
@@ -99,6 +100,25 @@
             return Data;
         }
 
-        
+        public long Incrby(string key)
+        {
+         return  RedisHelper.IncrBy(key);
+        }
+
+        public string Get32sn()
+        {
+            string formattedDate = DateTime.Now.ToString("yyyyMMdd");
+
+
+            var sn = Incrby($"CreatSnKey:{formattedDate}");
+            if(sn<1)
+            {
+                //璁剧疆鏈夋晥鏈熼檺涓�24灏忔椂
+                SetTtl($"CreatSnKey:{formattedDate}", 24 * 60 * 60);
+            }
+            string re = "Ez" + formattedDate + sn.ToString();
+
+            return re;
+        }
     }
 }

--
Gitblit v1.9.1