pay
This commit is contained in:
@@ -263,18 +263,20 @@ func CancelWayOrder(ctx *jxcontext.Context, userId string, param *bida.CancelOrd
|
||||
}
|
||||
dao.Commit(db, txDB)
|
||||
}()
|
||||
//余额增加金额
|
||||
userBill.AccountBalance += orderWay.PayPrice
|
||||
if _, err := dao.UpdateEntityTx(txDB, userBill, "AccountBalance"); err != nil {
|
||||
dao.Rollback(db, txDB)
|
||||
return FailCode, err
|
||||
}
|
||||
//用户运单状态更新
|
||||
order.OrderStatus = model.OrderStatusCancel
|
||||
if _, err := dao.UpdateEntityTx(txDB, order, "OrderStatus"); err != nil {
|
||||
dao.Rollback(db, txDB)
|
||||
return FailCode, err
|
||||
}
|
||||
// 支付方式为余额支付,则需要修改order/userVendorOrder,修改订单状态,给用户账户价钱,生成一个价钱数据
|
||||
} else if orderWay.PayMethod == 2 { // 微信支付
|
||||
}
|
||||
if orderWay.PayMethod == 2 { // 微信支付
|
||||
// 微信支付原路退款,发起退款申请
|
||||
res, err := RefundOrderByTL(ctx, orderWay, order, order.OtherWayBill, int(order.ChannelFee*100), "申请退款")
|
||||
if len(res.VendorRefundID) > 0 {
|
||||
|
||||
Reference in New Issue
Block a user