1
This commit is contained in:
@@ -165,7 +165,8 @@ func PayByBalance(ctx *jxcontext.Context, orderID string, isChoose, payType int,
|
|||||||
//快递混合支付
|
//快递混合支付
|
||||||
if orderInfo.OrderType == model.OrderTypeDelivery {
|
if orderInfo.OrderType == model.OrderTypeDelivery {
|
||||||
// (3)使用余额且 余额大于支付金额
|
// (3)使用余额且 余额大于支付金额
|
||||||
if userBill.AccountBalance > 0 && userBill.AccountBalance > orderInfo.PayPrice && isChoose == model.PayChooseBalance {
|
if isChoose == model.PayChooseBalance {
|
||||||
|
if userBill.AccountBalance > 0 && userBill.AccountBalance > orderInfo.PayPrice {
|
||||||
globals.SugarLogger.Debug("进入余额支付部分")
|
globals.SugarLogger.Debug("进入余额支付部分")
|
||||||
txDB, _ := dao.Begin(db)
|
txDB, _ := dao.Begin(db)
|
||||||
defer func() {
|
defer func() {
|
||||||
@@ -214,7 +215,8 @@ func PayByBalance(ctx *jxcontext.Context, orderID string, isChoose, payType int,
|
|||||||
} else {
|
} else {
|
||||||
return nil, "order/user_vendor_order更新状态出错", nil
|
return nil, "order/user_vendor_order更新状态出错", nil
|
||||||
}
|
}
|
||||||
} else if isChoose == model.PayChooseBalance && userBill.AccountBalance < orderInfo.PayPrice {
|
} else {
|
||||||
|
//else if isChoose == model.PayChooseBalance && userBill.AccountBalance < orderInfo.PayPrice {
|
||||||
//(1)用户选中余额 但余额<订单总价 需混合微信支付
|
//(1)用户选中余额 但余额<订单总价 需混合微信支付
|
||||||
if userBill.AccountBalance == 0 {
|
if userBill.AccountBalance == 0 {
|
||||||
WxPayParam, err := Pay(ctx, orderInfo.OrderID, payType, vendorPayType, appID, orderInfo.PayPrice)
|
WxPayParam, err := Pay(ctx, orderInfo.OrderID, payType, vendorPayType, appID, orderInfo.PayPrice)
|
||||||
@@ -234,7 +236,9 @@ func PayByBalance(ctx *jxcontext.Context, orderID string, isChoose, payType int,
|
|||||||
return WxPayParam, "", err
|
return WxPayParam, "", err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if isChoose == model.PayNotChooseBalance {
|
}
|
||||||
|
}
|
||||||
|
if isChoose == model.PayNotChooseBalance {
|
||||||
//(4)不选中余额支付 即直接微信支付
|
//(4)不选中余额支付 即直接微信支付
|
||||||
globals.SugarLogger.Debug("进入PayNotChooseBalance==================")
|
globals.SugarLogger.Debug("进入PayNotChooseBalance==================")
|
||||||
WxPayParam, err := Pay(ctx, orderInfo.OrderID, payType, vendorPayType, appID, orderInfo.PayPrice)
|
WxPayParam, err := Pay(ctx, orderInfo.OrderID, payType, vendorPayType, appID, orderInfo.PayPrice)
|
||||||
|
|||||||
Reference in New Issue
Block a user