微信退款bug
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user