From 5426a2144940dbfbc58acf5e344a0b9bfcf9bd92 Mon Sep 17 00:00:00 2001 From: liguoyang Date: Thu, 18 Apr 2024 15:03:41 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E5=A4=96=E9=83=A8=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E7=85=A7=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Services/Implements/GainfoFaceService.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Src/Dlhis.Basic/Organization/Services/Implements/GainfoFaceService.cs b/Src/Dlhis.Basic/Organization/Services/Implements/GainfoFaceService.cs index b7754a96..5080477d 100644 --- a/Src/Dlhis.Basic/Organization/Services/Implements/GainfoFaceService.cs +++ b/Src/Dlhis.Basic/Organization/Services/Implements/GainfoFaceService.cs @@ -45,6 +45,16 @@ public class GainfoFaceService : IGainfoFaceService 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(); gainfo.ThrowIfNull("人员信息不存在");