Merge branch 'release' into dev

dev
mofangmin 1 year ago
commit 1d87ca592e
  1. 2
      common/activity.go
  2. 7
      modules/backend/handler/guser/editGameUserGold.go
  3. 8
      modules/backend/handler/guser/getGameUserInfo.go

@ -566,7 +566,7 @@ type ConfigRtp struct {
ID int `gorm:"column:id;type:int(11) AUTO_INCREMENT;primary_key"` ID int `gorm:"column:id;type:int(11) AUTO_INCREMENT;primary_key"`
MinRecharge int64 `gorm:"column:min_recharge;type:bigint(20);comment:最小充值" web:"min_recharge"` MinRecharge int64 `gorm:"column:min_recharge;type:bigint(20);comment:最小充值" web:"min_recharge"`
MaxRecharge int64 `gorm:"column:max_recharge;type:bigint(20);comment:最小充值" web:"max_recharge"` MaxRecharge int64 `gorm:"column:max_recharge;type:bigint(20);comment:最小充值" web:"max_recharge"`
Rtp int `gorm:"column:rtp;type:int(11);comment:rtp" json:"rtp" web:"rtp"` Rtp int `gorm:"column:rtp;type:int(11);comment:rtp" web:"rtp"`
EnterPer int `gorm:"column:enter_per;type:int(11);comment:进入提存比" web:"enter_per"` EnterPer int `gorm:"column:enter_per;type:int(11);comment:进入提存比" web:"enter_per"`
ExitPer int `gorm:"column:exit_per;type:int(11);comment:退出提存比" web:"exit_per"` ExitPer int `gorm:"column:exit_per;type:int(11);comment:退出提存比" web:"exit_per"`
} }

@ -51,6 +51,12 @@ func EditGameUserRtp(c *gin.Context) {
if !a.S(req) { if !a.S(req) {
return return
} }
rtpData := &common.PlayerRtpData{Uid: req.UID}
db.Mysql().Get(rtpData)
if rtpData.Id == 0 {
rtpData.Rtp = req.Val
db.Mysql().Create(rtpData)
} else {
err := db.Mysql().Update(&common.PlayerRtpData{Uid: req.UID}, map[string]interface{}{ err := db.Mysql().Update(&common.PlayerRtpData{Uid: req.UID}, map[string]interface{}{
"rtp": req.Val, "rtp": req.Val,
}) })
@ -58,6 +64,7 @@ func EditGameUserRtp(c *gin.Context) {
a.Code = values.CodeRetry a.Code = values.CodeRetry
a.Msg = "modify rtp error" a.Msg = "modify rtp error"
} }
}
a.RecordEdit(values.PowerGUser, fmt.Sprintf("修改玩家%vRtp:%v", req.UID, req.Val)) a.RecordEdit(values.PowerGUser, fmt.Sprintf("修改玩家%vRtp:%v", req.UID, req.Val))
} }

@ -93,13 +93,7 @@ func GetGameUserInfo(c *gin.Context) {
// usdtInfo := call.GetPlayerRechargeInfoByCurrency(uid, common.CurrencyUSDT) // usdtInfo := call.GetPlayerRechargeInfoByCurrency(uid, common.CurrencyUSDT)
resp.RechargeBrl = brlInfo.TotalRecharge resp.RechargeBrl = brlInfo.TotalRecharge
resp.WithdrawBrl = brlInfo.TotalWithdraw resp.WithdrawBrl = brlInfo.TotalWithdraw
rtp := call.GetUserRtp(uid) resp.Rtp, _ = db.Redis().GetInt(common.GetRedisKeyPlayerRtp(uid))
if rtp.Id == 0 {
db.Mysql().Create(rtp)
rtp.Rtp, _ = db.Redis().GetInt(common.GetRedisKeyPlayerRtp(uid))
} else {
resp.Rtp = rtp.Rtp
}
// resp.RechargeUsdt = usdtInfo.TotalRecharge // resp.RechargeUsdt = usdtInfo.TotalRecharge
// resp.WithdrawUsdt = usdtInfo.TotoalWithdraw // resp.WithdrawUsdt = usdtInfo.TotoalWithdraw

Loading…
Cancel
Save