微信退款bug

This commit is contained in:
gazebo
2019-12-05 12:14:31 +08:00
parent 33f38552d4
commit 7c7457db40

View File

@@ -514,9 +514,11 @@ func CancelOrder(ctx *jxcontext.Context, order *model.GoodsOrder, reason string)
if orderPay.Status == model.PayStatusYes {
refundID := utils.Int64ToStr(GenRefundID(order))
orderPayRefund, err2 := refundOrderByWX(ctx, orderPay, refundID)
if err = err2; err == nil {
if err2 == nil {
dao.WrapAddIDCULDEntity(orderPayRefund, ctx.GetUserName())
errList.AddErr(dao.CreateEntity(dao.GetDB(), orderPay))
} else {
errList.AddErr(err2)
}
} else {
orderPay.Status = model.PayStatusCanceled
@@ -524,7 +526,9 @@ func CancelOrder(ctx *jxcontext.Context, order *model.GoodsOrder, reason string)
errList.AddErr(err2)
}
}
errList.AddErr(changeOrderStatus(order.VendorOrderID, model.OrderStatusCanceled, reason))
if errList.GetErrListAsOne() == nil {
errList.AddErr(changeOrderStatus(order.VendorOrderID, model.OrderStatusCanceled, reason))
}
err = errList.GetErrListAsOne()
}
} else {