From 3ff8b662ffb931bf3555c0ba187dfe204451818d Mon Sep 17 00:00:00 2001 From: zpc Date: Sat, 27 Sep 2025 15:46:46 +0800 Subject: [PATCH] 32 --- .../Controllers/SQController.cs | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/CoreCms.Net.Web.WebApi/Controllers/SQController.cs b/CoreCms.Net.Web.WebApi/Controllers/SQController.cs index f4fbd15..f016a8e 100644 --- a/CoreCms.Net.Web.WebApi/Controllers/SQController.cs +++ b/CoreCms.Net.Web.WebApi/Controllers/SQController.cs @@ -900,7 +900,22 @@ public class SQController : ControllerBase Msg = "预约已满" }; } - + string paymentId = ""; + if (reservation.deposit_fee > 0) + { + var imdata = JsonConvert.DeserializeObject>(dto.important_data); + if (imdata == null || !imdata.ContainsKey("paymentId") || string.IsNullOrEmpty(imdata["paymentId"].ToString())) + { + return new WebApiDto() + { + Code = 500, + Data = null, + Msg = "押金支付信息错误!" + }; + } + //订单编号 + paymentId = imdata["paymentId"].ToString(); + } // 4. 插入参与人记录 var participant = new SQReservationParticipants { @@ -910,7 +925,8 @@ public class SQController : ControllerBase role = 0, // 0为参与者 status = 0, is_refund = reservation.deposit_fee > 0 ? 1 : 0, - important_data = dto.important_data + important_data = dto.important_data, + paymentId = paymentId, }; await _SQReservationParticipantsServices.InsertAsync(participant);