From 1571dee924ea10cdcb55300cf02f70c6208c0333 Mon Sep 17 00:00:00 2001
From: 移动系统liao <liaoxujun@qq.com>
Date: 星期二, 27 八月 2024 16:37:28 +0800
Subject: [PATCH] 增加人脸验证逻辑,支付接口,和逻辑

---
 cylsg/cylsg.Application/Orders/OrderWorkerAppService.cs |   31 ++++++++++++++++++++++++++++++-
 1 files changed, 30 insertions(+), 1 deletions(-)

diff --git a/cylsg/cylsg.Application/Orders/OrderWorkerAppService.cs b/cylsg/cylsg.Application/Orders/OrderWorkerAppService.cs
index 3f658a3..d8731ba 100644
--- a/cylsg/cylsg.Application/Orders/OrderWorkerAppService.cs
+++ b/cylsg/cylsg.Application/Orders/OrderWorkerAppService.cs
@@ -3,9 +3,11 @@
 using cylsg.Core;
 using cylsg.Model.OrderModel;
 using cylsg.Model.UserModel;
+using EzTencentCloud;
 using Furion.LinqBuilder;
 using MapsterMapper;
 using Org.BouncyCastle.Asn1.X509;
+using SqlSugar.Extensions;
 using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -26,11 +28,13 @@
         private readonly ISystemService _systemService;
         private ISqlSugarClient _sqlSugarClient;
         private IMapper _mapper;
-        public OrderWorkerAppService(ISystemService systemService, ISqlSugarClient sqlSugarClient, IMapper mapper)
+        private readonly ITencentCloudService _tencentCloudService;
+        public OrderWorkerAppService(ISystemService systemService, ISqlSugarClient sqlSugarClient, IMapper mapper,ITencentCloudService tencentCloudService)
         {
             _systemService = systemService;
             _sqlSugarClient = sqlSugarClient;
             _mapper = mapper;
+            _tencentCloudService = tencentCloudService;
         }
 
 
@@ -176,6 +180,7 @@
 
             return result;
         }
+
 
 
 
@@ -416,6 +421,30 @@
             {
                 throw Oops.Oh("璇ユ墦鍗¤褰曞凡缁忓鎵癸紝涓嶈兘鎵撳崱锛�");
             }
+            //浜鸿劯璇嗗埆
+            if (App.Configuration["VerifyFace:Enable"].ObjToBool())
+            {
+                if (string.IsNullOrWhiteSpace(dakaDto.FaceImg))
+                {
+                    throw Oops.Oh("鏈瘑鍒汉鑴�");
+                }
+
+                var UserWorkRes = await new BaseRepository<UserWorker>().GetFirstAsync(x => x.UserId == userid);
+                if (UserWorkRes == null)
+                {
+                    throw Oops.Oh("鍛樺伐鏈敞鍐屾垚宸ヤ汉");
+                }
+                var faseres = _tencentCloudService.VerifyFace(dakaDto.FaceImg, UserWorkRes.IAIPersonId);
+
+                if (faseres.IsMatch != true)
+                {
+                    throw Oops.Oh("涓嶆槸鏈汉");
+                }
+            }
+
+
+
+
             if(orderBiddingDetail == null)
             {
                 orderBiddingDetail = new OrderBiddingDetail();

--
Gitblit v1.9.1