后台RTP显示

dev
mofangmin 1 year ago
parent eef18c22d3
commit cb659df6f3
  1. 7
      modules/backend/handler/guser/editGameUserGold.go
  2. 8
      modules/backend/handler/guser/getGameUserInfo.go

@ -51,6 +51,12 @@ func EditGameUserRtp(c *gin.Context) {
if !a.S(req) {
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{}{
"rtp": req.Val,
})
@ -58,6 +64,7 @@ func EditGameUserRtp(c *gin.Context) {
a.Code = values.CodeRetry
a.Msg = "modify rtp error"
}
}
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)
resp.RechargeBrl = brlInfo.TotalRecharge
resp.WithdrawBrl = brlInfo.TotalWithdraw
rtp := call.GetUserRtp(uid)
if rtp.Id == 0 {
db.Mysql().Create(rtp)
rtp.Rtp, _ = db.Redis().GetInt(common.GetRedisKeyPlayerRtp(uid))
} else {
resp.Rtp = rtp.Rtp
}
resp.Rtp, _ = db.Redis().GetInt(common.GetRedisKeyPlayerRtp(uid))
// resp.RechargeUsdt = usdtInfo.TotalRecharge
// resp.WithdrawUsdt = usdtInfo.TotoalWithdraw

Loading…
Cancel
Save