diff --git a/Src/Dlhis.Basic/Organization/Controllers/GainfosController.cs b/Src/Dlhis.Basic/Organization/Controllers/GainfosController.cs
index 56b26d43..ba5b825f 100644
--- a/Src/Dlhis.Basic/Organization/Controllers/GainfosController.cs
+++ b/Src/Dlhis.Basic/Organization/Controllers/GainfosController.cs
@@ -123,5 +123,16 @@ public class GainfosController : ControllerBase
{
return await _gainfoService.GetFaceByUserCodeAsync(userCode);
}
+
+ ///
+ /// 批量获取人脸照片
+ ///
+ ///
+ ///
+ [HttpGet("face/{userCodes}")]
+ public async Task> GetFaceByUserCodesAsync([FromQuery] List userCodes)
+ {
+ return await _gainfoService.GetFaceByUserCodesAsync(userCodes);
+ }
}
diff --git a/Src/Dlhis.Basic/Organization/Services/IGainfoService.cs b/Src/Dlhis.Basic/Organization/Services/IGainfoService.cs
index 77e812c1..dc895583 100644
--- a/Src/Dlhis.Basic/Organization/Services/IGainfoService.cs
+++ b/Src/Dlhis.Basic/Organization/Services/IGainfoService.cs
@@ -24,4 +24,6 @@ public interface IGainfoService : IScopeDependency
Task GetFaceAsync(string token);
Task GetFaceByUserCodeAsync(string userCode);
+
+ Task> GetFaceByUserCodesAsync(List userCodes);
}
diff --git a/Src/Dlhis.Basic/Organization/Services/Implements/GainfoService.cs b/Src/Dlhis.Basic/Organization/Services/Implements/GainfoService.cs
index 9a7f6a44..3eee0824 100644
--- a/Src/Dlhis.Basic/Organization/Services/Implements/GainfoService.cs
+++ b/Src/Dlhis.Basic/Organization/Services/Implements/GainfoService.cs
@@ -328,4 +328,15 @@ public class GainfoService : IGainfoService
return faceUrl + token;
});
}
+ public async Task> GetFaceByUserCodesAsync(List userCodes)
+ {
+ var faces = new List();
+
+ foreach (var userCode in userCodes)
+ {
+ var faceUrl = await GetFaceByUserCodeAsync(userCode);
+ faces.Add(faceUrl);
+ }
+ return faces;
+ }
}