From 949939568bbf3865bc28667fd41711d2c2fab334 Mon Sep 17 00:00:00 2001 From: songliang Date: Sun, 9 Jul 2023 15:07:57 +0800 Subject: [PATCH] ... --- webapp/services/LogService.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/webapp/services/LogService.php b/webapp/services/LogService.php index 8f762b69..048dd925 100644 --- a/webapp/services/LogService.php +++ b/webapp/services/LogService.php @@ -16,6 +16,8 @@ class LogService extends BaseService const HERO_LEVEL_UP = "hero_level_Up"; //英雄升级 const CHIP_LEVEL_UP = "chip_level_Up"; //芯片升级 + const SHOP_BUY_ITEM = "shop_buy_item"; //商城购买物品 + const CONSUME_TYPE = 0; //消耗 ↑ const PRODUCT_TYPE = 1; //产出 ↓ @@ -24,6 +26,10 @@ class LogService extends BaseService const BATTLE_PASS_AWARD = "battle_pass_award"; //通行证奖励 const SIGN_AWARD = "sign_award"; //签到奖励 + const CEBG_TO_DIAMOND = "cebg_to_diamond"; //CEBG兑换钻石 + const RECHARGE_DIAMOND = "recharge_diamond"; //充值钻石 + + const PRONAME = 'game_2006_api'; const GAMEID = 2006; @@ -74,6 +80,20 @@ class LogService extends BaseService TGLog::writeToLog(self::PRONAME,self::GAMEID,$logInfo); } + public static function productDiamond($event,$param = []) + { + $logInfo = self::goldRecord(); + $data = self::userInfo(); + $data['type'] = self::PRODUCT_TYPE; + $data['event_name'] = $event['name']; + $data['event_type'] = self::DIAMOND_TYPE; + $data['event_product'] = 'diamond'; + $data['event_product_val'] = $event['val']; + + $logInfo['properties'] = array_merge($data,$param); + TGLog::writeToLog(self::PRONAME,self::GAMEID,$logInfo); + } + private static function userInfo() {