From 63e225ec8252ab8a54b7154a229ac651056f26c8 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 14 十一月 2022 18:21:43 +0800
Subject: [PATCH] 9749 【后台】增加查看付费留存(增加玩家真实付费相关记录: 首次时间、今日总付费、累计总付费)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/ClearFirstGold.py | 3 +++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py | 18 +++++++++++++++++-
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py | 3 +++
3 files changed, 23 insertions(+), 1 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index 61fd952..2d0c84d 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -3583,6 +3583,9 @@
Def_PDict_LVAwardVIPGetRecord = "LVAwardVIPGetRecord" # 等级奖励vip领取信息记录,按二进制位标示
Def_PDict_HistoryChargeAwardGetRecord = "HTotalGoldAwardRecord" # 历史累计充值奖励领取信息记录,按二进制位标示
Def_PDict_CTGCountResetTime = "CTGCountResetTime" # CTG次数重置时间time值
+Def_PDict_CTGRealToday = "CTGRealToday" # 当日真实货币充值Coin数 ,不含后台充值 - 今日
+Def_PDict_CTGRealTotal = "CTGRealTotal" # 累计真实货币充值Coin数 ,不包后台充值 - 总计
+Def_PDict_CTGRealFirstTime = "CTGRealFirstTime" # 首次真实货币充值时间戳
Def_PDict_TodayCTGCoinTotal = "TodayCTGCoinTotal" # 当日充值Coin数
Def_PDict_TodayCTGCount = "TodayCTGCount_%s" # 当日充值次数,参数(CTG对应的商品记录ID)
Def_PDict_CTGGoodsBuyCount = "CTGGoodsBuyCount_%s" # 对应充值商品已购买次数,参数(CTG对应的商品记录ID)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/ClearFirstGold.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/ClearFirstGold.py
index 891fbb5..f71c888 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/ClearFirstGold.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/ClearFirstGold.py
@@ -60,5 +60,8 @@
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_RechargePrizeID, 0)
PlayerActRechargePrize.__CheckPlayerRechargePrizeAction(curPlayer)
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CTGRealToday, 0)
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CTGRealTotal, 0)
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CTGRealFirstTime, 0)
return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py
index 3882185..304ec51 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py
@@ -153,6 +153,7 @@
PlayerActGrowupBuy.DoUpdateGrowupBuyStateOnDay(curPlayer) # 成长必买
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TodayCTGCoinTotal, 0)
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CTGRealToday, 0)
syncRecordIDList = []
ipyDataMgr = IpyGameDataPY.IPY_Data()
@@ -401,6 +402,20 @@
return giveItemList
def DoCTGLogic(curPlayer, coinType, orderCoin, addGold, prizeGold, giveItemList, isAddBourseMoney, eventName, addDRDict, ctgIpyData=None, coinExp=0):
+
+ isRealMoney = True if addDRDict.get("orderID") else False # 是否真实货币充值,仅真实货币充值订单有orderID,后台充值的不算真实货币充值
+ ctgRealToday = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CTGRealToday) # 当日真实货币充值Coin数 ,不含后台充值- 今日
+ ctgRealTotal = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CTGRealTotal) # 累计真实货币充值Coin数 ,不包后台充值 - 总计
+ ctgRealFirstTime = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CTGRealFirstTime) # 首次真实货币充值时间戳
+ if isRealMoney:
+ if not ctgRealFirstTime:
+ ctgRealFirstTime = int(time.time())
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CTGRealFirstTime, ctgRealFirstTime)
+ ctgRealToday += orderCoin
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CTGRealToday, ctgRealToday)
+ ctgRealTotal += orderCoin
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CTGRealTotal, ctgRealTotal)
+
notifyMark = ctgIpyData.GetNotifyMark() if ctgIpyData else ""
goldBefore = curPlayer.GetGold()
bourseMoneyBefore = PlayerControl.GetMoney(curPlayer, ShareDefine.TYPE_Price_BourseMoney)
@@ -473,7 +488,8 @@
serverDay = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_ServerDay) + 1
addDRDict.update({"gold":[goldBefore, goldAfter], "changeCoinPoint":[changeCoinPointBefore, changeCoinPointAfter], "todayCTGCoinTotal":todayCTGCoinTotal,
"bourseMoney":[bourseMoneyBefore, bourseMoneyAfter], "addGold":addGold, "prizeGold":prizeGold, "giveItemList":giveItemList, "coinType":coinType,
- "coinExp":coinExp, "addVIPExp":addVIPExp, "VIPLv":curPlayer.GetVIPLv(), "ServerDay":serverDay})
+ "coinExp":coinExp, "addVIPExp":addVIPExp, "VIPLv":curPlayer.GetVIPLv(), "ServerDay":serverDay,
+ "ctgRealToday":ctgRealToday, "ctgRealTotal":ctgRealTotal, "ctgRealFirstTime":GameWorld.ChangeTimeNumToStr(ctgRealFirstTime) if ctgRealFirstTime else ""})
DataRecordPack.DR_CTGOK(curPlayer, addDRDict)
GameWorld.Log("Billing: coinType=%s,eventName=%s, %s" % (coinType, eventName, addDRDict), curPlayer.GetPlayerID())
return
--
Gitblit v1.8.0