Skip to content

Commit 31110a8

Browse files
author
v-anzha
committed
jwt expired time
1 parent a6275d7 commit 31110a8

141 files changed

Lines changed: 11338 additions & 2385 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Blog.Core.Common/Redis/IRedisCacheManager.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,7 @@ public interface IRedisCacheManager
2323
void Remove(string key);
2424
//清除
2525
void Clear();
26+
string GetValue(string key);
27+
bool SetValue(string key, byte[] value);
2628
}
2729
}

Blog.Core.Common/Redis/RedisCacheManager.cs

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,17 @@ public bool Get(string key)
7676
{
7777
return redisConnection.GetDatabase().KeyExists(key);
7878
}
79+
80+
/// <summary>
81+
/// 查询
82+
/// </summary>
83+
/// <param name="key"></param>
84+
/// <returns></returns>
85+
public string GetValue(string key)
86+
{
87+
return redisConnection.GetDatabase().StringGet(key);
88+
}
89+
7990
/// <summary>
8091
/// 获取
8192
/// </summary>
@@ -118,7 +129,16 @@ public void Set(string key, object value, TimeSpan cacheTime)
118129
}
119130
}
120131

132+
/// <summary>
133+
/// 增加/修改
134+
/// </summary>
135+
/// <param name="key"></param>
136+
/// <param name="value"></param>
137+
/// <returns></returns>
138+
public bool SetValue(string key, byte[] value)
139+
{
140+
return redisConnection.GetDatabase().StringSet(key, value, TimeSpan.FromSeconds(120));
141+
}
121142

122-
123143
}
124144
}
512 Bytes
Binary file not shown.
96 Bytes
Binary file not shown.
512 Bytes
Binary file not shown.
96 Bytes
Binary file not shown.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using Blog.Core.IRepository.Base;
2+
using Blog.Core.Model.Models;
3+
4+
namespace Blog.Core.IRepository
5+
{
6+
/// <summary>
7+
/// IRoleRepository
8+
/// </summary>
9+
public interface IRoleRepository : IBaseRepository<Role>//类名
10+
{
11+
12+
13+
}
14+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using System;
2+
using Blog.Core.IRepository.Base;
3+
using Blog.Core.Model.Models;
4+
5+
namespace Blog.Core.FrameWork.IRepository
6+
{
7+
/// <summary>
8+
/// IUserRoleRepository
9+
/// </summary>
10+
public interface IUserRoleRepository : IBaseRepository<UserRole>//类名
11+
{
12+
13+
14+
}
15+
}
16+
17+
Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
using Blog.Core.IRepository.Base;
1+
using Blog.Core.IRepository.Base;
22
using Blog.Core.Model.Models;
3-
using System;
4-
using System.Collections.Generic;
5-
using System.Linq;
6-
using System.Text;
7-
using System.Threading.Tasks;
83

94
namespace Blog.Core.IRepository
10-
{
11-
public partial interface IsysUserInfoRepository : IBaseRepository<sysUserInfo>
5+
{
6+
/// <summary>
7+
/// IsysUserInfoRepository
8+
/// </summary>
9+
public interface IsysUserInfoRepository : IBaseRepository<sysUserInfo>//类名
1210
{
1311

12+
1413
}
1514
}
Binary file not shown.

0 commit comments

Comments
 (0)