This commit is contained in:
richboo111
2022-07-27 16:09:01 +08:00
parent e8eac75f71
commit 6a06a29e54
2 changed files with 9 additions and 11 deletions

View File

@@ -254,22 +254,21 @@ func CancelWayOrder(ctx *jxcontext.Context, userId string, param *bida.CancelOrd
}
// 暂时考虑余额支付渠道加载order表判断支付渠道方式
orderWay, err := dao.GetOrderByID(db, tmp_orderNo)
order1 := *orderWay
globals.SugarLogger.Debug("============", &order1.PayPrice)
globals.SugarLogger.Debug("========= dfedfwfwdsw", &order1.PayMethod)
if err != nil {
return err
}
globals.SugarLogger.Debug("orderWay.PayPrice==============", orderWay.PayPrice)
globals.SugarLogger.Debug("orderWay.PayMethod==============", orderWay.PayMethod)
//orderWay := &model.Order{OrderID: param.OrderNo, UserID: userId}
//if err := dao.GetEntity(dao.GetDB(), orderWay, "OrderID", "UserID"); err != nil {
// return err
//}
if order1.PayMethod == 1 { // 余额支付
if orderWay.PayMethod == 1 { // 余额支付
// 支付方式为余额支付则需要修改order/userVendorOrder修改订单状态给用户账户价钱生成一个价钱数据
} else if order1.PayMethod == 2 { // 微信支付
} else if orderWay.PayMethod == 2 { // 微信支付
// 微信支付原路退款,发起退款申请
_, err := RefundOrderByTL(ctx, &order1, order, order.OtherWayBill, int(order.ChannelFee*100), "申请退款")
_, err := RefundOrderByTL(ctx, orderWay, order, order.OtherWayBill, int(order.ChannelFee*100), "申请退款")
return err
}