<feat>修复支付宝网页支付关闭订单问题

已关闭订单收到支付成功回调加入异常订单
This commit is contained in:
renzhiyuan 2026-07-28 16:34:13 +08:00
parent 1ae0da11e9
commit d84f870745
2 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,6 @@ package data
import ( import (
"PaymentCenter/app/models/orderexceptionmodel" "PaymentCenter/app/models/orderexceptionmodel"
"PaymentCenter/app/utils/snowflake"
"xorm.io/xorm" "xorm.io/xorm"
) )
@ -18,7 +17,7 @@ func NewOrderExceptionRepo(repo xorm.Interface) *OrderExceptionRepo {
} }
func (m *OrderExceptionRepo) InsertOne(orderException *orderexceptionmodel.OrderException) (int64, error) { func (m *OrderExceptionRepo) InsertOne(orderException *orderexceptionmodel.OrderException) (int64, error) {
orderException.Id = snowflake.GetID()
return m.repo.InsertOne(orderException) return m.repo.InsertOne(orderException)
} }

View File

@ -232,6 +232,7 @@ func (o *OrderNotify) checkOrder() {
CreateTime: time.Now(), CreateTime: time.Now(),
Status: o.order.Status, Status: o.order.Status,
}) })
if err != nil { if err != nil {
utils.Log(nil, "异常数据记录失败:%s", err.Error()) utils.Log(nil, "异常数据记录失败:%s", err.Error())
} }