This commit is contained in:
Xy
2021-04-23 10:02:36 +00:00
parent c83391cf5a
commit e4c3350726
15 changed files with 58 additions and 35 deletions

View File

@@ -10,7 +10,7 @@ namespace Dilon.Core
SysUser User { get; }
long UserId { get; }
Task<SysUser> CheckUserAsync(long userId, bool tracking = true);
Task<SysEmp> GetUserEmpInfo(long userId);
Task<SysUser> CheckUserAsync(string userId, bool tracking = true);
Task<SysEmp> GetUserEmpInfo(string userId);
}
}

View File

@@ -55,7 +55,7 @@ namespace Dilon.Core
/// <param name="userId"></param>
/// <param name="tracking"></param>
/// <returns></returns>
public async Task<SysUser> CheckUserAsync(long userId, bool tracking = true)
public async Task<SysUser> CheckUserAsync(string userId, bool tracking = true)
{
var user = await _sysUserRep.FirstOrDefaultAsync(u => u.Id == userId, tracking);
return user ?? throw Oops.Oh(ErrorCode.D1002);
@@ -66,7 +66,7 @@ namespace Dilon.Core
/// </summary>
/// <param name="userId"></param>
/// <returns></returns>
public async Task<SysEmp> GetUserEmpInfo(long userId)
public async Task<SysEmp> GetUserEmpInfo(string userId)
{
var emp = await _sysEmpRep.FirstOrDefaultAsync(u => u.Id == userId, false);
return emp ?? throw Oops.Oh(ErrorCode.D1002);