后台RTP显示

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

@ -51,12 +51,19 @@ func EditGameUserRtp(c *gin.Context) {
if !a.S(req) { if !a.S(req) {
return return
} }
err := db.Mysql().Update(&common.PlayerRtpData{Uid: req.UID}, map[string]interface{}{ rtpData := &common.PlayerRtpData{Uid: req.UID}
"rtp": req.Val, db.Mysql().Get(rtpData)
}) if rtpData.Id == 0 {
if err != nil { rtpData.Rtp = req.Val
a.Code = values.CodeRetry db.Mysql().Create(rtpData)
a.Msg = "modify rtp error" } else {
err := db.Mysql().Update(&common.PlayerRtpData{Uid: req.UID}, map[string]interface{}{
"rtp": req.Val,
})
if err != nil {
a.Code = values.CodeRetry
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