parent
aa9effcaf4
commit
c3d5ed9774
|
|
@ -214,12 +214,14 @@ func (o *OrderNotify) checkOrder() {
|
|||
if o.Code != errorcode.OrdersExist {
|
||||
return
|
||||
}
|
||||
utils.Log(nil, "收到回调,当前状态:%d", o.order.Status)
|
||||
switch o.order.Status {
|
||||
case common.ORDER_STATUS_PAYING:
|
||||
return
|
||||
default:
|
||||
utils.Log(nil, "订单状态异常,加入异常数据表:%d", o.order.Status)
|
||||
exceptionModel := data.NewOrderExceptionRepo(orderexceptionmodel.GetInstance().GetDb())
|
||||
_, _ = exceptionModel.InsertOne(&orderexceptionmodel.OrderException{
|
||||
_, err := exceptionModel.InsertOne(&orderexceptionmodel.OrderException{
|
||||
OrderId: o.order.Id,
|
||||
OutTradeNo: o.order.OutTradeNo,
|
||||
ExceptionType: data.OrderStatusOverButPaySuccess.ToInt(),
|
||||
|
|
@ -227,6 +229,9 @@ func (o *OrderNotify) checkOrder() {
|
|||
CreateTime: time.Now(),
|
||||
Status: o.order.Status,
|
||||
})
|
||||
if err != nil {
|
||||
utils.Log(nil, "异常数据记录失败:%s", err.Error())
|
||||
}
|
||||
o.Code = errorcode.OrderStatusErr
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue