parent
18c62257b4
commit
f0d430473f
|
|
@ -12,7 +12,6 @@ import (
|
|||
"PaymentCenter/app/services"
|
||||
"PaymentCenter/app/utils"
|
||||
"PaymentCenter/app/utils/httpclient"
|
||||
|
||||
"time"
|
||||
|
||||
"github.com/bytedance/sonic"
|
||||
|
|
@ -209,21 +208,19 @@ func (o *OrderNotify) checkApp() {
|
|||
}
|
||||
|
||||
func (o *OrderNotify) checkOrder() {
|
||||
//fmt.Println(fmt.Sprintf("检查订单状态:%d", o.order.Id))
|
||||
utils.Log(nil, "检查订单状态")
|
||||
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))
|
||||
|
||||
utils.Log(nil, "收到回调,当前状态:%d", o.order.Status)
|
||||
switch o.order.Status {
|
||||
case common.ORDER_STATUS_PAYING:
|
||||
return
|
||||
default:
|
||||
//fmt.Println(fmt.Sprintf("订单状态异常,加入异常数据表:%d", o.order.Status))
|
||||
|
||||
utils.Log(nil, "订单状态异常,加入异常数据表:%d", o.order.Status)
|
||||
exceptionModel := data.NewOrderExceptionRepo(orderexceptionmodel.GetInstance().GetDb())
|
||||
_, err := exceptionModel.InsertOne(&orderexceptionmodel.OrderException{
|
||||
OrderId: o.order.Id,
|
||||
|
|
|
|||
Loading…
Reference in New Issue