fix 外部人员上传照片
This commit is contained in:
@@ -45,6 +45,16 @@ public class GainfoFaceService : IGainfoFaceService
|
|||||||
|
|
||||||
public async Task UploadExternalFaceAsync(GainfoUploadFaceRequest request)
|
public async Task UploadExternalFaceAsync(GainfoUploadFaceRequest request)
|
||||||
{
|
{
|
||||||
|
var protector = _dataProtectionProvider.CreateProtector("gainfo:external:idno");
|
||||||
|
try
|
||||||
|
{
|
||||||
|
request.UserNo = protector.Unprotect(request.UserNo);
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
throw new UserFriendlyException("凭证有误,无法获取人脸数");
|
||||||
|
}
|
||||||
|
|
||||||
var gainfo = await _gainfoStore.Queryable(GainfoStatusEnumType.External).Where(x => x.No == request.UserNo).FirstAsync();
|
var gainfo = await _gainfoStore.Queryable(GainfoStatusEnumType.External).Where(x => x.No == request.UserNo).FirstAsync();
|
||||||
gainfo.ThrowIfNull("人员信息不存在");
|
gainfo.ThrowIfNull("人员信息不存在");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user