From ea87ce44af824d6e7641786a7d24e3548e47a757 Mon Sep 17 00:00:00 2001 From: hujiabin <519660157@qq.com> Date: Tue, 25 Jul 2023 14:43:44 +0800 Subject: [PATCH 1/3] 1 --- webapp/controller/SeasonController.class.php | 9 +++++++++ webapp/services/TameBattleDataService.php | 7 +++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/webapp/controller/SeasonController.class.php b/webapp/controller/SeasonController.class.php index 605c7929..4a71754e 100644 --- a/webapp/controller/SeasonController.class.php +++ b/webapp/controller/SeasonController.class.php @@ -47,6 +47,15 @@ class SeasonController extends BaseAuthedController { // $this->awardService = new services\AwardService(); $this->userInfo = $this->_safeGetOrmUserInfo(); $this->redisService = $this->_getRedis($this->redis_key_ranking); + $this->myRankedInfo = array( + 'ranking' => 10001, + 'name' => $this->userInfo['name'], + 'head_id' => $this->userInfo['head_id'], + 'head_frame' => $this->userInfo['head_frame'], + 'rank' => $this->userInfo['rank'], + 'score' => $this->userInfo['score'], + 'point' => 0, + ); if ($this->redisService->exists(RANKING_KEY.$this->redis_key_account)){ $myInfo = $this->userInfo; if ($this->redisService->hexists(RANKING_KEY.$this->redis_key_account,$myInfo['account_id'])){ diff --git a/webapp/services/TameBattleDataService.php b/webapp/services/TameBattleDataService.php index 387dae8c..6efaf18a 100644 --- a/webapp/services/TameBattleDataService.php +++ b/webapp/services/TameBattleDataService.php @@ -452,6 +452,7 @@ class TameBattleDataService extends BaseService { if ($winningPro){ $newScore = FormulaService::calcBattleAfterRankScore($this->userInfo,$this->battleInfo,$winningPro); //赛后排位积分 + error_log("addBattleSettlementSingle : ".$newScore); //黄金以下段位,失败时不扣积分 if ($newScore < $this->userInfo['score'] && $this->userInfo['score']< 1300){ $newScore = $this->userInfo['score']; @@ -552,9 +553,10 @@ class TameBattleDataService extends BaseService { $winningPro = $this->celWinningPro($userDb); if ($winningPro){ $newScore = FormulaService::calcBattleAfterRankScore($userDb,$info,$winningPro); //赛后排位积分 + error_log("addBattleSettlementTeam : ".$newScore); //黄金以下段位,失败时不扣积分 - if ($newScore < $this->userInfo['score'] && $this->userInfo['score']< 1300){ - $newScore = $this->userInfo['score']; + if ($newScore < $userDb['score'] && $userDb['score']< 1300){ + $newScore = $userDb['score']; } mt\Rank::calcNewRankAndScore( $newRank, $newScore); } @@ -842,6 +844,7 @@ class TameBattleDataService extends BaseService { $winningPro = $this->celWinningPro($this->userInfo); if ($winningPro){ $newScore = FormulaService::calcBattleAfterRankScore($this->userInfo,$this->battleInfo,$winningPro); //赛后排位积分 + error_log("updateScore : ".$newScore); //黄金以下段位,失败时不扣积分 if ($newScore < $this->userInfo['score'] && $this->userInfo['score']< 1300){ $newScore = $this->userInfo['score']; From 0d50172f85b763464b26c732d5f18b6e68aa7591 Mon Sep 17 00:00:00 2001 From: hujiabin <519660157@qq.com> Date: Tue, 25 Jul 2023 14:48:18 +0800 Subject: [PATCH 2/3] 1 --- webapp/services/TameBattleDataService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/services/TameBattleDataService.php b/webapp/services/TameBattleDataService.php index 6efaf18a..988d50cf 100644 --- a/webapp/services/TameBattleDataService.php +++ b/webapp/services/TameBattleDataService.php @@ -536,7 +536,7 @@ class TameBattleDataService extends BaseService { $data['members'] = array(); $pvp_mode = getXVal($this->allInfo,'pvp_match_mode', 0); foreach ($this->teamInfo as $info){ - $info['team_rank'] = getXVal($this->allInfo,'pvp_team_rank', 0); + $info['pvp_team_rank'] = getXVal($this->allInfo,'pvp_team_rank', 0); $oldRank = 0; $newRank = 0; $oldScore = 0; From e15d0762ba40b72687eb25998e65df0a542fb3d7 Mon Sep 17 00:00:00 2001 From: hujiabin <519660157@qq.com> Date: Tue, 25 Jul 2023 15:40:50 +0800 Subject: [PATCH 3/3] 1 --- webapp/controller/PassController.class.php | 12 ++++++++++++ webapp/services/LogService.php | 2 ++ webapp/services/TameBattleDataService.php | 3 --- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/webapp/controller/PassController.class.php b/webapp/controller/PassController.class.php index f6280d5a..227cad58 100644 --- a/webapp/controller/PassController.class.php +++ b/webapp/controller/PassController.class.php @@ -270,6 +270,12 @@ class PassController extends BaseAuthedController return; } $this->_decItems($costItems); + //埋点 + $event = [ + 'name' => LogService::BUY_BATTLE_PASS, + 'val' => \mt\Parameter::getVal('battlepass_price', '') + ]; + LogService::consumeDiamond($event); //激活白金通行证状态 User::update(array( 'activated' => 1, @@ -303,6 +309,12 @@ class PassController extends BaseAuthedController return; } $this->_decItems($costItems); + //埋点 + $event = [ + 'name' => LogService::BUY_PASS_EXP, + 'val' => $celPrice + ]; + LogService::consumeDiamond($event); //提升通行证等级 $items = array( array( diff --git a/webapp/services/LogService.php b/webapp/services/LogService.php index dc0a6854..4f1b8057 100644 --- a/webapp/services/LogService.php +++ b/webapp/services/LogService.php @@ -15,6 +15,8 @@ class LogService extends BaseService const USER_RENAME = "user_rename"; //用户改名 const HERO_LEVEL_UP = "hero_level_Up"; //英雄升级 const CHIP_LEVEL_UP = "chip_level_Up"; //芯片升级 + const BUY_BATTLE_PASS = "buy_battle_pass"; //通行证购买 + const BUY_PASS_EXP = "buy_pass_exp"; //购买通行证经验 const SHOP_BUY_ITEM = "shop_buy_item_normal"; //商城购买物品 const SHOP_BUY_ITEM_DAILY = "shop_buy_item_daily"; //商城每日精选购买物品 diff --git a/webapp/services/TameBattleDataService.php b/webapp/services/TameBattleDataService.php index 988d50cf..5d5ec388 100644 --- a/webapp/services/TameBattleDataService.php +++ b/webapp/services/TameBattleDataService.php @@ -452,7 +452,6 @@ class TameBattleDataService extends BaseService { if ($winningPro){ $newScore = FormulaService::calcBattleAfterRankScore($this->userInfo,$this->battleInfo,$winningPro); //赛后排位积分 - error_log("addBattleSettlementSingle : ".$newScore); //黄金以下段位,失败时不扣积分 if ($newScore < $this->userInfo['score'] && $this->userInfo['score']< 1300){ $newScore = $this->userInfo['score']; @@ -553,7 +552,6 @@ class TameBattleDataService extends BaseService { $winningPro = $this->celWinningPro($userDb); if ($winningPro){ $newScore = FormulaService::calcBattleAfterRankScore($userDb,$info,$winningPro); //赛后排位积分 - error_log("addBattleSettlementTeam : ".$newScore); //黄金以下段位,失败时不扣积分 if ($newScore < $userDb['score'] && $userDb['score']< 1300){ $newScore = $userDb['score']; @@ -844,7 +842,6 @@ class TameBattleDataService extends BaseService { $winningPro = $this->celWinningPro($this->userInfo); if ($winningPro){ $newScore = FormulaService::calcBattleAfterRankScore($this->userInfo,$this->battleInfo,$winningPro); //赛后排位积分 - error_log("updateScore : ".$newScore); //黄金以下段位,失败时不扣积分 if ($newScore < $this->userInfo['score'] && $this->userInfo['score']< 1300){ $newScore = $this->userInfo['score'];