feat: 新增AI账户服务及扩展用户信息获取功能,支持通过userId查询用户信息
This commit is contained in:
@@ -284,11 +284,12 @@ namespace Yi.Framework.Rbac.Application.Services
|
||||
}
|
||||
|
||||
[RemoteService(isEnabled: false)]
|
||||
public async Task<UserRoleMenuDto?> GetAsync(string? userName, long? phone)
|
||||
public async Task<UserRoleMenuDto?> GetAsync(string? userName, long? phone = null, Guid? userId = null)
|
||||
{
|
||||
var user = await _userRepository._DbQueryable
|
||||
.WhereIF(userName is not null, x => x.UserName == userName)
|
||||
.WhereIF(phone is not null, x => x.Phone == phone)
|
||||
.WhereIF(userId is not null, x => x.Id == userId)
|
||||
.Where(x => x.State == true)
|
||||
.FirstAsync();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user