LastName FirstName 修改为FullName 精简代码
This commit is contained in:
@@ -232,7 +232,7 @@ namespace IRaCIS.Application.Services
|
||||
}
|
||||
}
|
||||
|
||||
var list = await _userRepository.Where(t => t.EMail == email).Select(t => new UserAccountDto() { UserId = t.Id, UserName = t.UserName, UserRealName = t.LastName + " / " + t.FirstName, UserType = t.UserTypeRole.UserTypeShortName }).ToListAsync();
|
||||
var list = await _userRepository.Where(t => t.EMail == email).Select(t => new UserAccountDto() { UserId = t.Id, UserName = t.UserName, UserRealName = t.FullName, UserType = t.UserTypeRole.UserTypeShortName }).ToListAsync();
|
||||
|
||||
|
||||
|
||||
@@ -342,7 +342,7 @@ namespace IRaCIS.Application.Services
|
||||
public async Task<PageOutput<UserListDTO>> GetUserList(UserListQueryDTO param)
|
||||
{
|
||||
var userQueryable = _userRepository.Where(x => x.UserTypeEnum != UserTypeEnum.SuperAdmin)
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(param.UserName), t => t.UserName.Contains(param.UserName) || (t.LastName + ' ' + t.FirstName).Contains(param.UserName))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(param.UserName), t => t.UserName.Contains(param.UserName) || (t.FullName).Contains(param.UserName))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(param.Phone), t => t.Phone.Contains(param.Phone))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(param.OrganizationName), t => t.OrganizationName.Contains(param.OrganizationName))
|
||||
.WhereIf(param.UserType != null, t => t.UserTypeId == param.UserType)
|
||||
|
||||
Reference in New Issue
Block a user