From d84f870745053bdadb6314fcac175404b628f2f5 Mon Sep 17 00:00:00 2001 From: renzhiyuan <465386466@qq.com> Date: Tue, 28 Jul 2026 16:34:13 +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/data/order_exception.go | 3 +-- app/services/thirdpay/thirdpay_notify/notify.go | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/data/order_exception.go b/app/data/order_exception.go index 65de269..a8ab9b2 100644 --- a/app/data/order_exception.go +++ b/app/data/order_exception.go @@ -2,7 +2,6 @@ package data import ( "PaymentCenter/app/models/orderexceptionmodel" - "PaymentCenter/app/utils/snowflake" "xorm.io/xorm" ) @@ -18,7 +17,7 @@ func NewOrderExceptionRepo(repo xorm.Interface) *OrderExceptionRepo { } func (m *OrderExceptionRepo) InsertOne(orderException *orderexceptionmodel.OrderException) (int64, error) { - orderException.Id = snowflake.GetID() + return m.repo.InsertOne(orderException) } diff --git a/app/services/thirdpay/thirdpay_notify/notify.go b/app/services/thirdpay/thirdpay_notify/notify.go index aa91184..8f5a5e6 100644 --- a/app/services/thirdpay/thirdpay_notify/notify.go +++ b/app/services/thirdpay/thirdpay_notify/notify.go @@ -232,6 +232,7 @@ func (o *OrderNotify) checkOrder() { CreateTime: time.Now(), Status: o.order.Status, }) + if err != nil { utils.Log(nil, "异常数据记录失败:%s", err.Error()) }