|
|
|
@ -393,6 +393,7 @@ func WithdrawCallback(order *common.WithdrawOrder) error { |
|
|
|
|
|
|
|
|
|
|
|
// ReturnBackWithdraw 退出被拒绝或者失败,返还金币
|
|
|
|
// ReturnBackWithdraw 退出被拒绝或者失败,返还金币
|
|
|
|
func ReturnBackWithdraw(or *common.WithdrawOrder, originStatus, status uint8, payChannel ...int) error { |
|
|
|
func ReturnBackWithdraw(or *common.WithdrawOrder, originStatus, status uint8, payChannel ...int) error { |
|
|
|
|
|
|
|
log.Info("ReturnBackWithdraw orderid:%v,originStatus:%v,status:%v", or.OrderID, originStatus, status) |
|
|
|
order := &common.WithdrawOrder{} |
|
|
|
order := &common.WithdrawOrder{} |
|
|
|
order.ID = or.ID |
|
|
|
order.ID = or.ID |
|
|
|
tx := db.Mysql().Begin() |
|
|
|
tx := db.Mysql().Begin() |
|
|
|
@ -402,11 +403,10 @@ func ReturnBackWithdraw(or *common.WithdrawOrder, originStatus, status uint8, pa |
|
|
|
"fail_reason": or.FailReason, |
|
|
|
"fail_reason": or.FailReason, |
|
|
|
"callback_time": time.Now().Unix(), |
|
|
|
"callback_time": time.Now().Unix(), |
|
|
|
} |
|
|
|
} |
|
|
|
if len(or.Operator) == 0 { |
|
|
|
if status == common.StatusROrderFail { |
|
|
|
status = common.StatusROrderCreate |
|
|
|
status = common.StatusROrderCreate |
|
|
|
delete(u, "callback_time") |
|
|
|
u["callback_time"] = 0 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if len(payChannel) > 0 { |
|
|
|
if len(payChannel) > 0 { |
|
|
|
u["pay_channel"] = payChannel[0] |
|
|
|
u["pay_channel"] = payChannel[0] |
|
|
|
} |
|
|
|
} |
|
|
|
|