parent
a30b92ea68
commit
d32fc30bfc
|
|
@ -12,6 +12,7 @@ import (
|
||||||
"PaymentCenter/app/services"
|
"PaymentCenter/app/services"
|
||||||
"PaymentCenter/app/utils"
|
"PaymentCenter/app/utils"
|
||||||
"PaymentCenter/app/utils/httpclient"
|
"PaymentCenter/app/utils/httpclient"
|
||||||
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/bytedance/sonic"
|
"github.com/bytedance/sonic"
|
||||||
|
|
@ -208,19 +209,21 @@ func (o *OrderNotify) checkApp() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *OrderNotify) checkOrder() {
|
func (o *OrderNotify) checkOrder() {
|
||||||
utils.Log(nil, "检查订单状态:%d", o.order.Id)
|
fmt.Println(fmt.Sprintf("检查订单状态:%d", o.order.Id))
|
||||||
cond := builder.NewCond()
|
cond := builder.NewCond()
|
||||||
cond = cond.And(builder.Eq{"id": o.OrderId})
|
cond = cond.And(builder.Eq{"id": o.OrderId})
|
||||||
o.order, o.Code = services.OrderFindOne(&ordersmodel.Orders{}, cond)
|
o.order, o.Code = services.OrderFindOne(&ordersmodel.Orders{}, cond)
|
||||||
if o.Code != errorcode.OrdersExist {
|
if o.Code != errorcode.OrdersExist {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
utils.Log(nil, "收到回调,当前状态:%d", o.order.Status)
|
fmt.Println(fmt.Sprintf("收到回调,当前状态:%d", o.order.Status))
|
||||||
|
|
||||||
switch o.order.Status {
|
switch o.order.Status {
|
||||||
case common.ORDER_STATUS_PAYING:
|
case common.ORDER_STATUS_PAYING:
|
||||||
return
|
return
|
||||||
default:
|
default:
|
||||||
utils.Log(nil, "订单状态异常,加入异常数据表:%d", o.order.Status)
|
fmt.Println(fmt.Sprintf("订单状态异常,加入异常数据表:%d", o.order.Status))
|
||||||
|
|
||||||
exceptionModel := data.NewOrderExceptionRepo(orderexceptionmodel.GetInstance().GetDb())
|
exceptionModel := data.NewOrderExceptionRepo(orderexceptionmodel.GetInstance().GetDb())
|
||||||
_, err := exceptionModel.InsertOne(&orderexceptionmodel.OrderException{
|
_, err := exceptionModel.InsertOne(&orderexceptionmodel.OrderException{
|
||||||
OrderId: o.order.Id,
|
OrderId: o.order.Id,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue