diff --git a/call/pay.go b/call/pay.go index 58b49cf..b513193 100644 --- a/call/pay.go +++ b/call/pay.go @@ -249,9 +249,15 @@ func RechargeCallback(r *common.RechargeOrder, success bool, payAccount, extra s // if per > 0 { // bonus = amount * per / 100 // } - needBet := GetConfigCurrencyResourceNeedBet(common.CurrencyResourceRecharge, amount) + t := common.CurrencyResourceRecharge + if notCharge && bonus > 0 { // 首充 + t = common.CurrencyResourceFirstRecharge + } else if bonus > 0 { + t = common.CurrencyResourceRechargeBonus + } + needBet := GetConfigCurrencyResourceNeedBet(t, amount) if bonus > 0 { - needBet = GetConfigCurrencyResourceNeedBet(common.CurrencyResourceRechargeBonus, amount+bonus) + needBet = GetConfigCurrencyResourceNeedBet(t, amount+bonus) } cb := &common.CurrencyBalance{ UID: r.UID, diff --git a/common/currency.go b/common/currency.go index b8fb1e2..c99d194 100644 --- a/common/currency.go +++ b/common/currency.go @@ -27,6 +27,7 @@ const ( CurrencyResourceRecharge // 一般充值 CurrencyResourceBonus // 额外赠送 CurrencyResourceRechargeBonus // bonus充值 + CurrencyResourceFirstRecharge // 首充 CurrencyResourceAll ) diff --git a/modules/web/handler/withdraw.go b/modules/web/handler/withdraw.go index 1e84aeb..5161605 100644 --- a/modules/web/handler/withdraw.go +++ b/modules/web/handler/withdraw.go @@ -355,10 +355,10 @@ func PlayerWithdraw(c *gin.Context) { var shouldAuto = false // 在总赠送比配置比例小时才判断个人 - if call.GetTotalRechargePer(realAmount) < config.GetConfig().Web.TotalWithdrawPer { - // 直接发起退出 - shouldAuto = call.CanAutoWithdraw(uid, re.TotalRecharge, re.TotalWithdraw+re.TotalWithdrawing+realAmount) - } + // if call.GetTotalRechargePer(realAmount) < config.GetConfig().Web.TotalWithdrawPer { + // 直接发起退出 + shouldAuto = call.CanAutoWithdraw(uid, re.TotalRecharge, re.TotalWithdraw+re.TotalWithdrawing+realAmount) + // } // 第二步,创建订单 withdrawChannel := -1 if req.ChannelID != nil {