parent
1011e33ea2
commit
8c2c4bfc20
|
|
@ -208,19 +208,20 @@ func (o *OrderNotify) checkApp() {
|
|||
}
|
||||
|
||||
func (o *OrderNotify) checkOrder() {
|
||||
utils.Log(nil, "检查订单状态:%d", o.OrderId)
|
||||
utils.Log(nil, "检查订单状态", o.OrderId)
|
||||
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 {
|
||||
if o.Code != errorcode.Success {
|
||||
utils.Log(nil, "订单状态错误,当前查询code", o.Code)
|
||||
return
|
||||
}
|
||||
utils.Log(nil, "收到回调,当前状态:%d", o.order.Status)
|
||||
utils.Log(nil, "收到回调,当前状态", o.order.Status)
|
||||
switch o.order.Status {
|
||||
case common.ORDER_STATUS_PAYING:
|
||||
return
|
||||
default:
|
||||
utils.Log(nil, "订单状态异常,加入异常数据表:%d", o.order.Status)
|
||||
utils.Log(nil, "订单状态异常,加入异常数据表", o.order.Status)
|
||||
exceptionModel := data.NewOrderExceptionRepo(orderexceptionmodel.GetInstance().GetDb())
|
||||
_, err := exceptionModel.InsertOne(&orderexceptionmodel.OrderException{
|
||||
OrderId: o.order.Id,
|
||||
|
|
|
|||
Loading…
Reference in New Issue