🍒 fix(user): 解决跨用户操作时会话信息不一致的问题
This commit is contained in:
parent
96164b3328
commit
6557895033
@ -27,7 +27,14 @@ public class UserManager(
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[System.Text.Json.Serialization.JsonIgnore]
|
[System.Text.Json.Serialization.JsonIgnore]
|
||||||
[Newtonsoft.Json.JsonIgnore]
|
[Newtonsoft.Json.JsonIgnore]
|
||||||
protected virtual UserSessionDao Session => _session ??= sysCacheService.Get<UserSessionDao>(CacheConst.KeyUserSession + UserId);
|
protected virtual UserSessionDao Session
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (_session == null || _session.UserId != UserId) _session = sysCacheService.Get<UserSessionDao>(CacheConst.KeyUserSession + UserId);
|
||||||
|
return _session;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 用户Id
|
/// 用户Id
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user