From c3d5ed9774b1b6d9acefcb8d2cceae510fa3a80e Mon Sep 17 00:00:00 2001 From: renzhiyuan <465386466@qq.com> Date: Tue, 28 Jul 2026 15:26:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=94=AF=E4=BB=98?= =?UTF-8?q?=E5=AE=9D=E7=BD=91=E9=A1=B5=E6=94=AF=E4=BB=98=E5=85=B3=E9=97=AD?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E9=97=AE=E9=A2=98=20=E5=B7=B2=E5=85=B3?= =?UTF-8?q?=E9=97=AD=E8=AE=A2=E5=8D=95=E6=94=B6=E5=88=B0=E6=94=AF=E4=BB=98?= =?UTF-8?q?=E6=88=90=E5=8A=9F=E5=9B=9E=E8=B0=83=E5=8A=A0=E5=85=A5=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E8=AE=A2=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/thirdpay/thirdpay_notify/notify.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/services/thirdpay/thirdpay_notify/notify.go b/app/services/thirdpay/thirdpay_notify/notify.go index 8f7e18a..bb0013b 100644 --- a/app/services/thirdpay/thirdpay_notify/notify.go +++ b/app/services/thirdpay/thirdpay_notify/notify.go @@ -214,12 +214,14 @@ func (o *OrderNotify) checkOrder() { if o.Code != errorcode.OrdersExist { return } + utils.Log(nil, "收到回调,当前状态:%d", o.order.Status) switch o.order.Status { case common.ORDER_STATUS_PAYING: return default: + utils.Log(nil, "订单状态异常,加入异常数据表:%d", o.order.Status) exceptionModel := data.NewOrderExceptionRepo(orderexceptionmodel.GetInstance().GetDb()) - _, _ = exceptionModel.InsertOne(&orderexceptionmodel.OrderException{ + _, err := exceptionModel.InsertOne(&orderexceptionmodel.OrderException{ OrderId: o.order.Id, OutTradeNo: o.order.OutTradeNo, ExceptionType: data.OrderStatusOverButPaySuccess.ToInt(), @@ -227,6 +229,9 @@ func (o *OrderNotify) checkOrder() { CreateTime: time.Now(), Status: o.order.Status, }) + if err != nil { + utils.Log(nil, "异常数据记录失败:%s", err.Error()) + } o.Code = errorcode.OrderStatusErr return }