fix 取消操作员
This commit is contained in:
@@ -9,11 +9,6 @@ public class UserResponse
|
||||
/// </summary>
|
||||
public string UserName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 操作员名称
|
||||
/// </summary>
|
||||
public string GainfoName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 规范化账号名称
|
||||
/// </summary>
|
||||
|
||||
@@ -14,17 +14,15 @@ namespace Dlhis.Sys.Identity.Services.Implements;
|
||||
public class UserService : IUserService
|
||||
{
|
||||
private readonly IDbContext _dbContext;
|
||||
private readonly IDbContext _dbContext1;
|
||||
|
||||
public UserService(IDbContext dbContext, IDbContext dbContext1)
|
||||
{
|
||||
_dbContext = dbContext.ChangeDb("identity");
|
||||
_dbContext1 = dbContext1;
|
||||
}
|
||||
|
||||
public async Task<Pagination<UserResponse>> GetPageAsync(UserPageRequest request)
|
||||
{
|
||||
var page = await _dbContext.Queryable<UserEntity>()
|
||||
return await _dbContext.Queryable<UserEntity>()
|
||||
.LeftJoin<UserRoleEntity>((x, ur) => x.Id == ur.UserId)
|
||||
.LeftJoin<RoleEntity>((x, ur, r) => ur.RoleId == r.Id)
|
||||
.WhereIF(request.Search.IsPresent(), x => x.UserName.Contains(request.Search)
|
||||
@@ -39,18 +37,6 @@ public class UserService : IUserService
|
||||
Role = r.Name
|
||||
}, true)
|
||||
.ToPageListAsync(request);
|
||||
|
||||
var gainfos = await _dbContext1.ChangeDb("default").Queryable<GainfoEntity>()
|
||||
.Where(x => x.IdentityUserId > 0)
|
||||
.ToListAsync();
|
||||
|
||||
page.Data.ForEach(item =>
|
||||
{
|
||||
item.GainfoName = gainfos.Where(x => x.IdentityUserId == item.Id)
|
||||
.FirstOrDefault()?.Name;
|
||||
});
|
||||
|
||||
return page;
|
||||
}
|
||||
|
||||
public async Task ResetAccessFailedCountAsync(int id)
|
||||
|
||||
@@ -25,20 +25,6 @@ public class SqlSugarPack : BaseAppPack
|
||||
InitKeyType = InitKeyType.Attribute,
|
||||
IsAutoCloseConnection = true,
|
||||
|
||||
MoreSettings = new ConnMoreSettings
|
||||
{
|
||||
DisableNvarchar = true,
|
||||
}
|
||||
},
|
||||
new()
|
||||
{
|
||||
ConfigId = "default",
|
||||
|
||||
ConnectionString = configuration.GetSection("SqlSugarOptions:DefaultConnectionString").Value,
|
||||
DbType = DbType.MySql,
|
||||
InitKeyType = InitKeyType.Attribute,
|
||||
IsAutoCloseConnection = true,
|
||||
|
||||
MoreSettings = new ConnMoreSettings
|
||||
{
|
||||
DisableNvarchar = true,
|
||||
|
||||
Reference in New Issue
Block a user