fix 用户列表查询问题
This commit is contained in:
@@ -30,7 +30,7 @@ public class UserService : IUserService
|
||||
.LeftJoin<UserRoleEntity>((x, ur) => x.Id == ur.UserId)
|
||||
.LeftJoin<RoleEntity>((x, ur, r) => ur.RoleId == r.Id)
|
||||
.LeftJoin<UserClaimEntity>((x, ur, r, c) => x.Id == c.UserId && c.ClaimType == "preferred_username")
|
||||
.LeftJoin<UserClaimEntity>((x, ur, r, c, cc) => x.Id == c.UserId && c.ClaimType == "tenant")
|
||||
.LeftJoin<UserClaimEntity>((x, ur, r, c, cc) => x.Id == cc.UserId && cc.ClaimType == "tenant")
|
||||
.Where(x => x.UserName != "admin")
|
||||
.Where((x, ur, r, c, cc) => cc.ClaimValue == tenant)
|
||||
.WhereIF(request.IsOperator, (x, ur, r, c) => !SqlFunc.IsNullOrEmpty(r.Name))
|
||||
@@ -116,11 +116,11 @@ public class UserService : IUserService
|
||||
|
||||
var id = (int)await _dbContext.InsertReturnIdentityAsync(user);
|
||||
|
||||
await _dbContext.InsertAsync(new UserTenantEntity
|
||||
await _dbContext.InsertAsync(request.Tenants.Select(x => new UserTenantEntity
|
||||
{
|
||||
TenantCode = request.Tenant,
|
||||
TenantCode = x,
|
||||
UserId = id
|
||||
});
|
||||
}).ToList());
|
||||
|
||||
if (request.Name.IsPresent())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user