From 3e14440cb203d28923ba9cfec39ceff15f2c35e7 Mon Sep 17 00:00:00 2001 From: lixiaojun <1287241240@qq.com> Date: 星期二, 26 三月 2024 09:55:08 +0800 Subject: [PATCH] 版本大更新 --- Yw.Service.Run.Core/05-lcache/03-medis/RunRealLastRecordCacheHelper.cs | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Yw.Service.Run.Core/05-cache/1-run-real-last-record/RunRealLastRecordCacheHelper.cs b/Yw.Service.Run.Core/05-lcache/03-medis/RunRealLastRecordCacheHelper.cs similarity index 84% copy from Yw.Service.Run.Core/05-cache/1-run-real-last-record/RunRealLastRecordCacheHelper.cs copy to Yw.Service.Run.Core/05-lcache/03-medis/RunRealLastRecordCacheHelper.cs index 157e072..dfe8292 100644 --- a/Yw.Service.Run.Core/05-cache/1-run-real-last-record/RunRealLastRecordCacheHelper.cs +++ b/Yw.Service.Run.Core/05-lcache/03-medis/RunRealLastRecordCacheHelper.cs @@ -1,18 +1,18 @@ -锘縩amespace Yw.RedisCache +锘縩amespace Yw.LCache.Medis { /// <summary> /// /// </summary> - public class RunRealLastRecordCacheHelper + public class RunRealLastRecordCacheHelper : IRunRealLastRecordCacheHelper { //Redis瀹㈡埛绔緟鍔╃被瀵硅薄 - private readonly RedisClientHelper _redisClient = new(); + private readonly MedisCacheHelper _medisHelper = new(); //鐢熸垚 HashKey private static string CreateHashKey() { - return RedisKeyHelper.CreateKey(_flag); + return CacheKeyHelper.CreateKey(_flag); } private const string _flag = "run-real-last-record"; @@ -48,7 +48,7 @@ } var hashKey = CreateHashKey(); var hashField = CreateHashField(record.ObjectType, record.ObjectID); - _redisClient.HashSetJosn(hashKey, hashField, record); + _medisHelper.HashSet(hashKey, hashField, record); return true; } @@ -78,7 +78,7 @@ public List<Model.RunRealRecord> GetLastRecord() { var hashKey = CreateHashKey(); - return _redisClient.HashGetJsonAll<Model.RunRealRecord>(hashKey); + return _medisHelper.HashValues<Model.RunRealRecord>(hashKey); } /// <summary> @@ -88,7 +88,7 @@ { var hashKey = CreateHashKey(); var hashField = CreateHashField(ObjectType); - return _redisClient.HashGetJsonStartWith<Model.RunRealRecord>(hashKey, hashField); + return _medisHelper.HashGetStartsWith<Model.RunRealRecord>(hashKey, hashField); } /// <summary> @@ -98,7 +98,7 @@ { var hashKey = CreateHashKey(); var hashField = CreateHashField(ObjectID); - return _redisClient.HashGetJsonEndWith<Model.RunRealRecord>(hashKey, hashField); + return _medisHelper.HashGetEndsWith<Model.RunRealRecord>(hashKey, hashField); } /// <summary> @@ -108,7 +108,7 @@ { var hashKey = CreateHashKey(); var hashField = CreateHashField(ObjectType, ObjectID); - return _redisClient.HashGetJson<Model.RunRealRecord>(hashKey, hashField); + return _medisHelper.HashGet<Model.RunRealRecord>(hashKey, hashField); } /// <summary> -- Gitblit v1.9.3