Compare commits

...

4 Commits

Author SHA1 Message Date
mofangmin 082625cbd8 分享修改 1 year ago
mofangmin 1d87ca592e Merge branch 'release' into dev 1 year ago
mofangmin 4df4eb8197 rtp结构修改 1 year ago
mofangmin cb659df6f3 后台RTP显示 1 year ago
  1. 2
      common/activity.go
  2. 19
      modules/backend/handler/guser/editGameUserGold.go
  3. 8
      modules/backend/handler/guser/getGameUserInfo.go
  4. 6
      modules/web/handler/share.go
  5. 4
      modules/web/values/share.go

@ -566,7 +566,7 @@ type ConfigRtp struct {
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"`
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"`
ExitPer int `gorm:"column:exit_per;type:int(11);comment:退出提存比" web:"exit_per"`
}

@ -51,12 +51,19 @@ func EditGameUserRtp(c *gin.Context) {
if !a.S(req) {
return
}
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"
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,
})
if err != nil {
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

@ -139,7 +139,7 @@ func ShareList(c *gin.Context) {
for _, item := range ret {
resp.TodayRewardList = append(resp.TodayRewardList, values.RewardInfo{
UID: item.Uid,
Amount: item.Amount,
Amount: util.Decimal(float64(item.Amount)/common.DecimalDigits, 2),
})
}
} else if req.Type == 2 {
@ -154,7 +154,7 @@ func ShareList(c *gin.Context) {
for _, item := range ret {
resp.RewardList = append(resp.RewardList, values.RewardInfo{
UID: item.Uid,
Amount: item.Amount,
Amount: util.Decimal(float64(item.Amount)/common.DecimalDigits, 2),
})
}
} else if req.Type == 3 {
@ -170,7 +170,7 @@ func ShareList(c *gin.Context) {
user, _ := call.GetUserXInfo(item.Uid, "birth")
resp.InviteList = append(resp.InviteList, values.InviteInfo{
UID: item.Uid,
RechargeAmount: item.RechargeAmount,
RechargeAmount: item.RechargeAmount / common.DecimalDigits,
RegisterTime: user.Birth,
})
}

@ -221,8 +221,8 @@ type ShareListResp struct {
Count int // 总数
}
type RewardInfo struct {
UID int // UID
Amount int64 // 总额
UID int // UID
Amount float64 // 总额
}
type InviteInfo struct {

Loading…
Cancel
Save