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()) }