增加红点,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()) log.Error("update week card err:%v", err.Error())
return return
} }
PushRed(r.UID, pb.RedPointModule_RedPointWeekCard, 1)
} }

@ -87,7 +87,14 @@ func GetConfigProviderGameListByID(provider, gameID int) *common.ConfigProviderG
} }
func GetProviderGameRtp(uid int) int { 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 { func GetProviderUserName(name string) string {

@ -48,8 +48,14 @@ func PushMailRed(uid int) {
redPoints := &common.PlayerRed{UID: uid} redPoints := &common.PlayerRed{UID: uid}
db.Mysql().Get(redPoints) db.Mysql().Get(redPoints)
checkMail(uid, redPoints) checkMail(uid, redPoints)
one := new(pb.RedPoint) one := &pb.RedPoint{
one.Mail = uint32(redPoints.Mail) List: []*pb.RedInfo{
{
ModuleName: pb.RedPointModule_RedPointMail,
Num: uint32(redPoints.Mail),
},
},
}
SendNR(uid, int(pb.ServerCommonCmd_CMD_BS_RedPointResp), one, "common") SendNR(uid, int(pb.ServerCommonCmd_CMD_BS_RedPointResp), one, "common")
//if redPoints.Mail > 0 { //if redPoints.Mail > 0 {
// one := new(pb.RedPoint) // 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 { } else {
// 一级 // 一级
upInfo = &common.ShareInfo{Share: share} 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()) log.Error("update spin err, %s", err.Error())
return 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). err = db.Mysql().C().Model(&common.ShareTaskNewData{}).Where("uid = ? and `type` = 2 and `status` = 0", upInfo.UID).
Updates(map[string]interface{}{ 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) { func UpdateShare(uid, updateType int, updateValue int64, expand ...string) (err error) {
if updateType == 1 { // 直接更新下注奖池 if updateType == 1 { // 直接更新下注奖池
_, _, expired, rankKey := getShareRankJackpotKey() _, _, expired, rankKey := getShareRankJackpotKey()

@ -30,5 +30,15 @@ func GetGameUserAllBalance(c *gin.Context) {
return return
} }
resp.Count = count 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 a.Data = resp
} }

@ -95,7 +95,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
resp.Rtp, _ = db.Redis().GetInt(common.GetRedisKeyPlayerRtp(uid)) resp.Rtp = call.GetUserRtp(uid).Rtp
// resp.RechargeUsdt = usdtInfo.TotalRecharge // resp.RechargeUsdt = usdtInfo.TotalRecharge
// resp.WithdrawUsdt = usdtInfo.TotoalWithdraw // resp.WithdrawUsdt = usdtInfo.TotoalWithdraw

@ -52,7 +52,7 @@ func RealData(c *gin.Context) {
// 充值统计 // 充值统计
resp.TotalRechargeData.RechargePlayerNum = models.GetOrderSuccessPlayerCountBySql(req.Channel, su, eu) resp.TotalRechargeData.RechargePlayerNum = models.GetOrderSuccessPlayerCountBySql(req.Channel, su, eu)
resp.TotalRechargeData.TotalRecharge = models.GetAmountTotalBySQL(su, eu, req.Channel) 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.RechargePlayerNum = models.GetOrderSuccessNewPlayerCountBySql(req.Channel, su, eu)
resp.NewRechargeData.TotalRecharge = models.GetNewPayAmountBySql(req.Channel, su, eu) resp.NewRechargeData.TotalRecharge = models.GetNewPayAmountBySql(req.Channel, su, eu)

@ -5,8 +5,8 @@ import (
"github.com/liangdas/mqant/log" "github.com/liangdas/mqant/log"
"server/common" "server/common"
"server/db" "server/db"
"server/modules/customer/app"
"server/modules/backend/values" "server/modules/backend/values"
"server/modules/customer/app"
) )
func GetGameUserAllBalance(c *gin.Context) { func GetGameUserAllBalance(c *gin.Context) {
@ -30,5 +30,15 @@ func GetGameUserAllBalance(c *gin.Context) {
return return
} }
resp.Count = count 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 a.Data = resp
} }

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

Loading…
Cancel
Save