🐛fix查询用户角色缓存不起作用问题
This commit is contained in:
parent
46c9563f33
commit
94fa69e8ef
@ -294,9 +294,9 @@ namespace ZR.Service
|
|||||||
public List<SysRole> SelectUserRoleListByUserId(long userId)
|
public List<SysRole> SelectUserRoleListByUserId(long userId)
|
||||||
{
|
{
|
||||||
return Context.Queryable<SysUserRole>()
|
return Context.Queryable<SysUserRole>()
|
||||||
.WithCache(60 * 10)
|
|
||||||
.LeftJoin<SysRole>((ur, r) => ur.RoleId == r.RoleId)
|
.LeftJoin<SysRole>((ur, r) => ur.RoleId == r.RoleId)
|
||||||
.Where((ur, r) => ur.UserId == userId && r.RoleId > 0)
|
.Where((ur, r) => ur.UserId == userId && r.RoleId > 0)
|
||||||
|
.WithCache(60 * 10)
|
||||||
.Select((ur, r) => r)
|
.Select((ur, r) => r)
|
||||||
.ToList();
|
.ToList();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user