diff --git a/call/pay.go b/call/pay.go index e234d54..33e3236 100644 --- a/call/pay.go +++ b/call/pay.go @@ -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) } diff --git a/call/provider.go b/call/provider.go index 41a5d63..fad9263 100644 --- a/call/provider.go +++ b/call/provider.go @@ -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 { diff --git a/call/redpoint.go b/call/redpoint.go index f362c5f..8b65695 100644 --- a/call/redpoint.go +++ b/call/redpoint.go @@ -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) diff --git a/call/share.go b/call/share.go index f626678..1e14004 100644 --- a/call/share.go +++ b/call/share.go @@ -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() diff --git a/modules/backend/handler/guser/getGameUserAllBalance.go b/modules/backend/handler/guser/getGameUserAllBalance.go index 08326da..bb16825 100644 --- a/modules/backend/handler/guser/getGameUserAllBalance.go +++ b/modules/backend/handler/guser/getGameUserAllBalance.go @@ -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 } diff --git a/modules/backend/handler/guser/getGameUserInfo.go b/modules/backend/handler/guser/getGameUserInfo.go index 1d960d0..424d9a7 100644 --- a/modules/backend/handler/guser/getGameUserInfo.go +++ b/modules/backend/handler/guser/getGameUserInfo.go @@ -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 diff --git a/modules/backend/handler/statistics/realData.go b/modules/backend/handler/statistics/realData.go index 4ccd025..5078dac 100644 --- a/modules/backend/handler/statistics/realData.go +++ b/modules/backend/handler/statistics/realData.go @@ -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) diff --git a/modules/customer/handler/guser/getGameUserAllBalance.go b/modules/customer/handler/guser/getGameUserAllBalance.go index 12c51c3..d4ff2bb 100644 --- a/modules/customer/handler/guser/getGameUserAllBalance.go +++ b/modules/customer/handler/guser/getGameUserAllBalance.go @@ -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 } diff --git a/pb/proto/platform.proto b/pb/proto/platform.proto index 222d124..c615111 100644 --- a/pb/proto/platform.proto +++ b/pb/proto/platform.proto @@ -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{