From f2f61fdb9a81fba256b1bd05330fbbac2633149a Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期二, 27 八月 2024 16:38:33 +0800 Subject: [PATCH] Merge branch 'master' of http://47.108.235.38:8080/r/cylsg --- 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 74c4038..61b287c 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; } + @@ -420,6 +425,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