完善系统通知,增加系统通知日志记录已读和未读通知

This commit is contained in:
2023-09-28 14:49:16 +08:00
parent b932f6f6a0
commit 1c08c837e6
11 changed files with 237 additions and 36 deletions
+13 -12
View File
@@ -1,4 +1,5 @@
using ZR.Common;
using ZR.Common.Cache;
namespace ZR.ServiceCore.SqlSugar
{
@@ -6,32 +7,32 @@ namespace ZR.ServiceCore.SqlSugar
{
public void Add<V>(string key, V value)
{
//RedisServer.Cache.Set(key, value, 3600 + RedisHelper.RandomExpired(5, 30));
CacheHelper.SetCache(key, value);
RedisServer.Cache.Set(key, value, 3600 + RedisHelper.RandomExpired(5, 30));
// CacheHelper.SetCache(key, value);
}
public void Add<V>(string key, V value, int cacheDurationInSeconds)
{
//RedisServer.Cache.Set(key, value, cacheDurationInSeconds);
CacheHelper.SetCaches(key, value, cacheDurationInSeconds);
RedisServer.Cache.Set(key, value, cacheDurationInSeconds);
// CacheHelper.SetCaches(key, value, cacheDurationInSeconds);
}
public bool ContainsKey<V>(string key)
{
//return RedisServer.Cache.Exists(key);
return CacheHelper.Exists(key);
return RedisServer.Cache.Exists(key);
// return CacheHelper.Exists(key);
}
public V Get<V>(string key)
{
//return RedisServer.Cache.Get<V>(key);
return (V)CacheHelper.Get(key);
return RedisServer.Cache.Get<V>(key);
// return (V)CacheHelper.Get(key);
}
public IEnumerable<string> GetAllKey<V>()
{
//return RedisServer.Cache.Keys("*");
return CacheHelper.GetCacheKeys();
return RedisServer.Cache.Keys("*");
// return CacheHelper.GetCacheKeys();
}
public V GetOrCreate<V>(string cacheKey, Func<V> create, int cacheDurationInSeconds = int.MaxValue)
@@ -59,8 +60,8 @@ namespace ZR.ServiceCore.SqlSugar
public void Remove<V>(string key)
{
//RedisServer.Cache.Del(key);
CacheHelper.Remove(key);
RedisServer.Cache.Del(key);
// CacheHelper.Remove(key);
}
}
}