增加红点,rtp配置

dev_aagame_provider
zhora 2 months ago
parent 37b2f586ea
commit 6b75067d26
  1. 1
      call/pay.go
  2. 9
      call/provider.go
  3. 10
      call/redpoint.go
  4. 4
      call/share.go
  5. 10
      modules/backend/handler/guser/getGameUserAllBalance.go
  6. 2
      modules/backend/handler/guser/getGameUserInfo.go
  7. 2
      modules/backend/handler/statistics/realData.go
  8. 12
      modules/customer/handler/guser/getGameUserAllBalance.go
  9. 12
      pb/proto/platform.proto

@ -853,4 +853,5 @@ func ActivityWeekCard(r *common.RechargeOrder, product *common.ConfigPayProduct)
log.Error("update week card err:%v", err.Error())
return
}
PushRed(r.UID, pb.RedPointModule_RedPointWeekCard, 1)
}

@ -87,7 +87,14 @@ func GetConfigProviderGameListByID(provider, gameID int) *common.ConfigProviderG
}
func GetProviderGameRtp(uid int) int {
return 85
rtp := 85
if v := GetConfigPlatform().Rtp; v > 0 {
rtp = v
}
if v := GetUserRtp(uid); v != nil && v.Rtp > 0 {
rtp = v.Rtp
}
return rtp
}
func GetProviderUserName(name string) string {

@ -48,8 +48,14 @@ func PushMailRed(uid int) {
redPoints := &common.PlayerRed{UID: uid}
db.Mysql().Get(redPoints)
checkMail(uid, redPoints)
one := new(pb.RedPoint)
one.Mail = uint32(redPoints.Mail)
one := &pb.RedPoint{
List: []*pb.RedInfo{
{
ModuleName: pb.RedPointModule_RedPointMail,
Num: uint32(redPoints.Mail),
},
},
}
SendNR(uid, int(pb.ServerCommonCmd_CMD_BS_RedPointResp), one, "common")
//if redPoints.Mail > 0 {
// one := new(pb.RedPoint)

@ -90,6 +90,7 @@ func ShareBind(share string, isOld bool, uid, cid int) {
},
})
}
PushRed(upInfo.UID, pb.RedPointModule_RedPointShare, 1)
} else {
// 一级
upInfo = &common.ShareInfo{Share: share}
@ -147,6 +148,7 @@ func ShareBind(share string, isOld bool, uid, cid int) {
log.Error("update spin err, %s", err.Error())
return
}
PushRed(upInfo.UID, pb.RedPointModule_RedPointPdd, 1)
// 裂变任务邀请人数
err = db.Mysql().C().Model(&common.ShareTaskNewData{}).Where("uid = ? and `type` = 2 and `status` = 0", upInfo.UID).
Updates(map[string]interface{}{
@ -848,7 +850,7 @@ func updateShareByUp(uid, upUid, uplevel, updateType int, updateValue int64, exp
}
}
// updateType(1:下注,2:充值,3:任务,4:邀请人,5:提现, 6:回滚)
// UpdateShare updateType(1:下注,2:充值,3:任务,4:邀请人,5:提现, 6:回滚)
func UpdateShare(uid, updateType int, updateValue int64, expand ...string) (err error) {
if updateType == 1 { // 直接更新下注奖池
_, _, expired, rankKey := getShareRankJackpotKey()

@ -30,5 +30,15 @@ func GetGameUserAllBalance(c *gin.Context) {
return
}
resp.Count = count
for index, v := range resp.List {
var eventName string
if v.Exs4 != "" {
eventName = v.Exs4
}
if eventName == "" {
eventName = common.GetCurrencyName(v.Event)
}
resp.List[index].EventName = eventName
}
a.Data = resp
}

@ -95,7 +95,7 @@ func GetGameUserInfo(c *gin.Context) {
// usdtInfo := call.GetPlayerRechargeInfoByCurrency(uid, common.CurrencyUSDT)
resp.RechargeBrl = brlInfo.TotalRecharge
resp.WithdrawBrl = brlInfo.TotalWithdraw
resp.Rtp, _ = db.Redis().GetInt(common.GetRedisKeyPlayerRtp(uid))
resp.Rtp = call.GetUserRtp(uid).Rtp
// resp.RechargeUsdt = usdtInfo.TotalRecharge
// resp.WithdrawUsdt = usdtInfo.TotoalWithdraw

@ -52,7 +52,7 @@ func RealData(c *gin.Context) {
// 充值统计
resp.TotalRechargeData.RechargePlayerNum = models.GetOrderSuccessPlayerCountBySql(req.Channel, su, eu)
resp.TotalRechargeData.TotalRecharge = models.GetAmountTotalBySQL(su, eu, req.Channel)
resp.TotalRechargeData.Arppu = utils.GetPoint(resp.TotalRechargeData.TotalRecharge, resp.TotalRechargeData.RechargePlayerNum)
resp.TotalRechargeData.Arppu = utils.GetPoint(resp.TotalRechargeData.TotalRecharge, resp.TotalRechargeData.RechargePlayerNum*common.DecimalDigits)
resp.NewRechargeData.RechargePlayerNum = models.GetOrderSuccessNewPlayerCountBySql(req.Channel, su, eu)
resp.NewRechargeData.TotalRecharge = models.GetNewPayAmountBySql(req.Channel, su, eu)

@ -5,8 +5,8 @@ import (
"github.com/liangdas/mqant/log"
"server/common"
"server/db"
"server/modules/customer/app"
"server/modules/backend/values"
"server/modules/customer/app"
)
func GetGameUserAllBalance(c *gin.Context) {
@ -30,5 +30,15 @@ func GetGameUserAllBalance(c *gin.Context) {
return
}
resp.Count = count
for index, v := range resp.List {
var eventName string
if v.Exs4 != "" {
eventName = v.Exs4
}
if eventName == "" {
eventName = common.GetCurrencyName(v.Event)
}
resp.List[index].EventName = eventName
}
a.Data = resp
}

@ -50,14 +50,15 @@ enum RedPointModule{
RedPointInvalid = 0;
RedPointTask = 1;
RedPointSign = 2;
RedPointShare = 3;
RedPointVipCashback = 4;
RedPointMail = 5;
RedPointShare = 3; // *
RedPointVipCashback = 4; //*
RedPointMail = 5;// *
RedPointFreeSpin = 6; //
RedPointVipReward = 7; // vip升级奖励
RedPointLoginAgain = 8; //
RedPointWeekCard = 9; //
RedPointWeekCard = 9; // *
RedPointFirstRecharge = 10 ; //
RedPointPdd = 11 ; //
}
message RedInfo {
@ -66,8 +67,7 @@ message RedInfo {
}
//
message RedPoint{
uint32 Mail = 1;
repeated RedInfo list = 2;
repeated RedInfo list = 1;
}
enum ConfigChangeType{

Loading…
Cancel
Save