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

已关闭订单收到支付成功回调加入异常订单
This commit is contained in:
renzhiyuan 2026-07-28 15:49:24 +08:00
parent d32fc30bfc
commit f15f96a570
1 changed files with 3 additions and 3 deletions

View File

@ -209,20 +209,20 @@ func (o *OrderNotify) checkApp() {
}
func (o *OrderNotify) checkOrder() {
fmt.Println(fmt.Sprintf("检查订单状态:%d", o.order.Id))
//fmt.Println(fmt.Sprintf("检查订单状态:%d", o.order.Id))
cond := builder.NewCond()
cond = cond.And(builder.Eq{"id": o.OrderId})
o.order, o.Code = services.OrderFindOne(&ordersmodel.Orders{}, cond)
if o.Code != errorcode.OrdersExist {
return
}
fmt.Println(fmt.Sprintf("收到回调,当前状态:%d", o.order.Status))
//fmt.Println(fmt.Sprintf("收到回调,当前状态:%d", o.order.Status))
switch o.order.Status {
case common.ORDER_STATUS_PAYING:
return
default:
fmt.Println(fmt.Sprintf("订单状态异常,加入异常数据表:%d", o.order.Status))
//fmt.Println(fmt.Sprintf("订单状态异常,加入异常数据表:%d", o.order.Status))
exceptionModel := data.NewOrderExceptionRepo(orderexceptionmodel.GetInstance().GetDb())
_, err := exceptionModel.InsertOne(&orderexceptionmodel.OrderException{