修改vip0提现逻辑

dev_aagame
zhora 1 week ago
parent 0047680a91
commit 7ddc4afdf5
  1. 32
      modules/web/app/balance.go

@ -25,8 +25,13 @@ func (g *Gin) CheckWithdrawCondition(amount int64, t common.CurrencyType) (ok bo
g.Msg = "You have not completed the required bets yet. Before making an extraction it should be done." g.Msg = "You have not completed the required bets yet. Before making an extraction it should be done."
return return
} }
con := call.GetVipCon(g.UID)
if con == nil {
g.Code = values.CodeWithdrawCondition
return
}
vip := call.GetVIP(g.UID) vip := call.GetVIP(g.UID)
if vip.Level == 0 { if vip.Level == 0 && con.WithdrawCount == 0 {
var limit int64 = 20 var limit int64 = 20
if con := call.GetConfigVIPByLevel(1); con != nil { if con := call.GetConfigVIPByLevel(1); con != nil {
limit = con.Exp / common.DecimalDigits limit = con.Exp / common.DecimalDigits
@ -36,20 +41,27 @@ func (g *Gin) CheckWithdrawCondition(amount int64, t common.CurrencyType) (ok bo
return return
} }
re := call.GetRechargeInfo(g.UID) re := call.GetRechargeInfo(g.UID)
con := call.GetVipCon(g.UID)
if con == nil {
g.Code = values.CodeWithdrawCondition
return
}
if re.DayWithdraw+amount >= int64(con.WithdrawAmount) { withdrawAmount := re.DayWithdraw + amount
withdrawCount := re.WithdrawCount
if con.Level == 0 {
withdrawAmount = re.TotalWithdraw + amount
withdrawCount = int(re.TotalWithdrawCount)
}
if withdrawAmount >= int64(con.WithdrawAmount) {
g.Code = values.CodeWithdrawLimit g.Code = values.CodeWithdrawLimit
g.Msg = "Clearance amount has reached today!" g.Msg = "Clearance amount has reached"
if vip.Level > 0 {
g.Msg += " today!"
}
return return
} }
if re.WithdrawCount >= con.WithdrawCount { if withdrawCount >= con.WithdrawCount {
g.Code = values.CodeWithdrawLimit g.Code = values.CodeWithdrawLimit
g.Msg = "Clearance count has reached today!" g.Msg = "Clearance count has reached"
if vip.Level > 0 {
g.Msg += " today!"
}
return return
} }

Loading…
Cancel
Save