From b91faa35de900ff37dcb657cd23d9524182daf85 Mon Sep 17 00:00:00 2001 From: mofangmin Date: Sat, 31 Aug 2024 10:49:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A6=82=E7=8E=87=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- call/pay.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/call/pay.go b/call/pay.go index e22bbbd..e845a94 100644 --- a/call/pay.go +++ b/call/pay.go @@ -242,7 +242,7 @@ func RechargeCallback(r *common.RechargeOrder, success bool, payAccount, extra s if count > 0 { val := rand.Intn(count) log.Info("val:%v", val) - if val <= ticket.CurProb { + if val < ticket.CurProb { AddUserDiscountTicket(uid, ticket.DiscountAmount, ticket.RechargeAmount, -1, 0, true) SendMailWithContent(uid, SystemTitle, fmt.Sprintf(EmailDiscount, ticket.DiscountAmount/common.DecimalDigits, ticket.RechargeAmount/common.DecimalDigits)) } else if nextTicket.Id > 0 {