feat: 新增AI账户服务及扩展用户信息获取功能,支持通过userId查询用户信息

This commit is contained in:
ccnetcore
2025-08-30 17:55:13 +08:00
parent ba07e2c905
commit 1c54e47b9e
5 changed files with 55 additions and 3 deletions

View File

@@ -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();