From c71e53b9823ac6ec5671ae42101477a3457fac57 Mon Sep 17 00:00:00 2001 From: zhora Date: Fri, 10 Oct 2025 15:11:37 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=AC=E7=9B=98=E5=B1=95=E7=A4=BA,=E4=BF=AE?= =?UTF-8?q?=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- call/activity.go | 14 ++++++++------ modules/web/handler/pdd.go | 2 +- modules/web/providers/sn/handler.go | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/call/activity.go b/call/activity.go index 927bcf6..b547c87 100644 --- a/call/activity.go +++ b/call/activity.go @@ -247,14 +247,16 @@ func UpdateUserActivitySlotsData(uid int, count int) { db.Mysql().Update(&common.ActivitySlotsData{UID: uid}, update) } -func ShouldShowActivityLuckShop(uid int) bool { - if !IsActivityValid(common.ActivityIDLuckyShop) { - return false +func ShouldShowActivityLuckShop(uid int) (result bool) { + luckyWheel := GetConfigLuckyWheel() + if luckyWheel == nil { + return } - if uid == 0 { - return true + rechargeInfo := GetRechargeInfo(uid) + if rechargeInfo.TotalRechargeCount <= int64(luckyWheel.RechargeCount) { + return } - return GetShowActivityLuckShopData(uid) != nil + return true } func GetShowActivityLuckShopData(uid int) *common.ActivityLuckyShopData { diff --git a/modules/web/handler/pdd.go b/modules/web/handler/pdd.go index 223b472..914d233 100644 --- a/modules/web/handler/pdd.go +++ b/modules/web/handler/pdd.go @@ -171,7 +171,7 @@ func PddLottery(c *gin.Context) { var award string amountFinal := pddData.Amount lessAmount := float64(pdd.WithdrawalAmount) - userAmount - if pddData.InviterAmount >= int64(pdd.WithdrawalAmount)*20 { + if pddData.InviterAmount >= int64(pdd.WithdrawalAmount*common.DecimalDigits)*20 { award = fmt.Sprintf("%v", lessAmount) amountFinal = fmt.Sprintf("%d", pdd.WithdrawalAmount) updateValues["amount"] = amountFinal diff --git a/modules/web/providers/sn/handler.go b/modules/web/providers/sn/handler.go index deb4bd9..7cd552f 100644 --- a/modules/web/providers/sn/handler.go +++ b/modules/web/providers/sn/handler.go @@ -167,6 +167,7 @@ func GameBet(c *gin.Context) { } betResp := base.SessionBet(betReq) if betResp.Code != base.CodeOk { + log.Error("sn gameBetResp err,%s:%v", account, betResp.Code) resp.Code = INVALIDREQUESTERR if betResp.Code == base.CodeAccepted { resp.Msg = "duplicate order" @@ -175,7 +176,6 @@ func GameBet(c *gin.Context) { } else { resp.Msg = "operation failed." } - log.Error("sn gameBetResp err,%s:%v", account, resp.Code) return } resp.Data.DeductionAmount = betAmount