This commit is contained in:
邹宗楠
2022-07-12 14:29:46 +08:00
parent c262cdf644
commit 9ecc91077b
2 changed files with 9 additions and 7 deletions

View File

@@ -58,10 +58,11 @@ func AddUserWithdrawal(ctx *jxcontext.Context, param *model.AddWithdrawalRecordR
}
// 发起支付
if err := SendPayInfo2Ali(payOrder, param); err != nil {
alipayOrder, err := SendPayInfo2Ali(payOrder, param)
if err != nil {
return err
}
if err := UpdateUserMoney(payOrder, userBill); err != nil {
if err := UpdateUserMoney(alipayOrder, userBill); err != nil {
return err
}
@@ -216,7 +217,7 @@ func ManagerExamineWithdrawal(userId, orderId string, examineStatus int, phone,
}
// 发起支付
if err := SendPayInfo2Ali(order, &model.AddWithdrawalRecordReq{
alipayOrder, err := SendPayInfo2Ali(order, &model.AddWithdrawalRecordReq{
WithdrawalMoney: order.PayMoney,
AlipayAccount: order.AlipayAccount,
AlipayName: order.AlipayName,
@@ -224,10 +225,11 @@ func ManagerExamineWithdrawal(userId, orderId string, examineStatus int, phone,
Lat: order.Lat,
CityCode: order.CityCode,
DistrictCode: order.DistrictCode,
}); err != nil {
})
if err != nil {
return err
}
if err := UpdateUserMoney(order, userBill); err != nil {
if err := UpdateUserMoney(alipayOrder, userBill); err != nil {
return err
}
return nil