fix 同时返回userNo
This commit is contained in:
@@ -18,7 +18,7 @@ public interface IGainfoService : IScopeDependency
|
||||
|
||||
Task MigrationAsync(MigrationRequest request);
|
||||
|
||||
Task<string> CheckIdNoAndNameMatchAsync(GainfoCheckIdNoAndNameRequest request);
|
||||
Task<object> CheckIdNoAndNameMatchAsync(GainfoCheckIdNoAndNameRequest request);
|
||||
|
||||
Task ResignAsync(GainfoResignRequest request);
|
||||
}
|
||||
|
||||
@@ -159,18 +159,19 @@ public class GainfoService : IGainfoService
|
||||
return info;
|
||||
}
|
||||
|
||||
public async Task<string> CheckIdNoAndNameMatchAsync(GainfoCheckIdNoAndNameRequest request)
|
||||
public async Task<object> CheckIdNoAndNameMatchAsync(GainfoCheckIdNoAndNameRequest request)
|
||||
{
|
||||
var match = await _gainfoStore.Queryable(GainfoStatusEnumType.External).AnyAsync(x => x.IdNo == request.IdNo && x.Name == request.Name);
|
||||
if (!match)
|
||||
{
|
||||
match = await _gainfoStore.Queryable(GainfoStatusEnumType.Working).AnyAsync(x => x.IdNo == request.IdNo && x.Name == request.Name);
|
||||
}
|
||||
var gainfo = await _gainfoStore.Queryable(GainfoStatusEnumType.External).FirstAsync(x => x.IdNo == request.IdNo && x.Name == request.Name)
|
||||
?? await _gainfoStore.Queryable(GainfoStatusEnumType.Working).FirstAsync(x => x.IdNo == request.IdNo && x.Name == request.Name);
|
||||
|
||||
match.ThrowIfFalse("验证失败!");
|
||||
gainfo.ThrowIfNull("验证失败!");
|
||||
|
||||
var protector = _dataProtectionProvider.CreateProtector("gainfo:external:idno");
|
||||
return protector.Protect(request.IdNo);
|
||||
return new
|
||||
{
|
||||
loginPass = protector.Protect(request.IdNo),
|
||||
UserNo = gainfo.No
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user