Compare commits

..

No commits in common. '082625cbd891d5566a9a1a8c2fef7ca5845f5537' and 'bccf1e3b1b33d977126290ca89121285900ce3bd' have entirely different histories.

  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"` 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" web:"rtp"` Rtp int `gorm:"column:rtp;type:int(11);comment:rtp" json:"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,19 +51,12 @@ func EditGameUserRtp(c *gin.Context) {
if !a.S(req) { if !a.S(req) {
return return
} }
rtpData := &common.PlayerRtpData{Uid: req.UID} err := db.Mysql().Update(&common.PlayerRtpData{Uid: req.UID}, map[string]interface{}{
db.Mysql().Get(rtpData) "rtp": req.Val,
if rtpData.Id == 0 { })
rtpData.Rtp = req.Val if err != nil {
db.Mysql().Create(rtpData) a.Code = values.CodeRetry
} else { a.Msg = "modify rtp error"
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,7 +93,13 @@ 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
resp.Rtp, _ = db.Redis().GetInt(common.GetRedisKeyPlayerRtp(uid)) 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.RechargeUsdt = usdtInfo.TotalRecharge // resp.RechargeUsdt = usdtInfo.TotalRecharge
// resp.WithdrawUsdt = usdtInfo.TotoalWithdraw // resp.WithdrawUsdt = usdtInfo.TotoalWithdraw

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

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

Loading…
Cancel
Save