diff --git a/webapp/controller/AvatarController.class.php b/webapp/controller/AvatarController.class.php index 22eebd64..4614a53e 100644 --- a/webapp/controller/AvatarController.class.php +++ b/webapp/controller/AvatarController.class.php @@ -148,14 +148,6 @@ class AvatarController extends BaseAuthedController { return; } $this->_decItems($costItems); - { - //埋点 - $event = [ - 'name' => LogService::BUY_HERO_AVATAR, - 'val' => $itemMeta['diamond'] - ]; - LogService::consumeDiamond($event); - } Avatar::addAvatar($itemMeta); $propertyChgService = new services\PropertyChgService(); $propertyChgService->addUserChg(); diff --git a/webapp/controller/BagController.class.php b/webapp/controller/BagController.class.php index 8c1a68a1..8996a640 100644 --- a/webapp/controller/BagController.class.php +++ b/webapp/controller/BagController.class.php @@ -218,15 +218,9 @@ class BagController extends BaseAuthedController { 'item_num' => mt\Parameter::getVal('rename_diamond_cost', 0) ) )); - { - //埋点 - $event = [ - 'name' => LogService::USER_RENAME, - 'val' => mt\Parameter::getVal('rename_diamond_cost', 0) - ]; - LogService::consumeDiamond($event); - myself()->_incV(TN_TOTAL_DIAMOND_CONSUME, 0, mt\Parameter::getVal('rename_diamond_cost', 0)); - } + + myself()->_incV(TN_TOTAL_DIAMOND_CONSUME, 0, mt\Parameter::getVal('rename_diamond_cost', 0)); + $this->propertyChgService->addUserChg(); } else { $this->_decItems(array( diff --git a/webapp/controller/DailySelectionController.class.php b/webapp/controller/DailySelectionController.class.php index aa9ef920..d2994d48 100644 --- a/webapp/controller/DailySelectionController.class.php +++ b/webapp/controller/DailySelectionController.class.php @@ -212,12 +212,6 @@ class DailySelectionController extends BaseAuthedController { LogService::consumeGold($event); } break; - case mt\Shop::TOKEN_TYPE_DIAMOND: - { - LogService::consumeDiamond($event); - myself()->_incV(TN_TOTAL_DIAMOND_CONSUME, 0, $costItems[0]['item_num']); - } - break; default: { break; diff --git a/webapp/controller/PassController.class.php b/webapp/controller/PassController.class.php index 20fd8704..6a809099 100644 --- a/webapp/controller/PassController.class.php +++ b/webapp/controller/PassController.class.php @@ -270,12 +270,6 @@ class PassController extends BaseAuthedController return; } $this->_decItems($costItems); - //埋点 - $event = [ - 'name' => LogService::BUY_BATTLE_PASS, - 'val' => \mt\Parameter::getVal('battlepass_price', '') - ]; - LogService::consumeDiamond($event); myself()->_incV(TN_TOTAL_DIAMOND_CONSUME, 0, \mt\Parameter::getVal('battlepass_price', '')); //激活白金通行证状态 User::update(array( @@ -310,12 +304,6 @@ class PassController extends BaseAuthedController return; } $this->_decItems($costItems); - //埋点 - $event = [ - 'name' => LogService::BUY_PASS_EXP, - 'val' => $celPrice - ]; - LogService::consumeDiamond($event); myself()->_incV(TN_TOTAL_DIAMOND_CONSUME, 0, $celPrice); //提升通行证等级 $items = array( diff --git a/webapp/services/LogService.php b/webapp/services/LogService.php index 214d13c9..f21675a2 100644 --- a/webapp/services/LogService.php +++ b/webapp/services/LogService.php @@ -12,17 +12,9 @@ use models\User; use phpcommon\TGLog; 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 BUY_HERO_AVATAR = "buy_hero_avatar"; //购买英雄装饰 - const REFRESH_MISSION = "refresh_mission"; //刷新每日任务 - const SHOP_BUY_ITEM = "shop_buy_item_normal"; //商城购买物品 + const REFRESH_MISSION = "refresh_mission"; //刷新每日任务 const SHOP_BUY_ITEM_DAILY = "shop_buy_item_daily"; //商城每日精选购买物品 - const SHOP_BUY_ITEM_BLIND_BOX = "shop_buy_item_blind_box"; //商城限购购买物品 const CONSUME_TYPE = 0; //消耗 ↑ const PRODUCT_TYPE = 1; //产出 ↓ @@ -32,10 +24,6 @@ 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 RECHARGE_CEBG_BONUS = "recarge_cebg_bonus"; //充值CEBG奖励 - const MARKET_SELL_GOLD = "market_sell_gold"; //市场出售金币 const MARKET_CANCEL_SELL_GOLD = "market_cancel_sell_gold"; //市场取消出售金币 const MARKET_BUY_GOLD = "market_buy_gold"; //市场购买金币 @@ -61,21 +49,6 @@ class LogService extends BaseService TGLog::writeToLog(self::PRONAME,self::GAMEID,$logInfo); } - public static function consumeDiamond($event,$param = []) - { - $logInfo = self::diamondRecord(myself()->_getAccountId()); - $data = self::userInfo(); - $data['type'] = self::CONSUME_TYPE; - $data['event_name'] = $event['name']; - $data['event_type'] = self::DIAMOND_TYPE; - $data['event_demand'] = 'diamond'; - $data['event_demand_val'] = $event['val']; - - $logInfo['properties'] = array_merge($data,$param); - - TGLog::writeToLog(self::PRONAME,self::GAMEID,$logInfo); - } - public static function productGold($event,$param = []) { $logInfo = self::goldRecord($param); @@ -103,28 +76,11 @@ class LogService extends BaseService TGLog::writeToLog(self::PRONAME,self::GAMEID,$logInfo); } - - public static function productDiamondCallback($base, $event,$param = []) - { - $logInfo = self::diamondRecord($base['account_id']); - $data = self::userInfoByAccountId($base['account_id']); - $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); - } - public static function consumeItem($event,$param = []) { $logInfo = self::ItemRecord(); $data = self::userInfo(); $data['type'] = self::CONSUME_TYPE; -// $data['event_name'] = $event['name']; -// $data['event_type'] = self::GOLD_TYPE; $data['item_id'] = $event['item_id']; $data['item_num'] = $event['item_num']; @@ -138,8 +94,6 @@ class LogService extends BaseService $logInfo = self::ItemRecord(); $data = self::userInfo(); $data['type'] = self::PRODUCT_TYPE; -// $data['event_name'] = $event['name']; -// $data['event_type'] = self::GOLD_TYPE; $data['item_id'] = $event['item_id']; $data['item_num'] = $event['item_num']; @@ -193,9 +147,6 @@ class LogService extends BaseService } else { $account_id = myself()->_getAccountId(); } - -// $logInfo['log_class'] = $logInfo['log_class']; -// unset($logInfo['log_class']); $data = array( "#account_id" => $account_id, "#event_name"=> "gold_record", @@ -207,19 +158,6 @@ class LogService extends BaseService return $data; } - private static function diamondRecord($account_id) - { - $data = [ - "#account_id" => $account_id, - "#event_name"=> "diamond_record", - "#ip"=> $_SERVER['REMOTE_ADDR'], - "#time"=> myself()->_getNowTime(), - "#type"=> "track", - "properties"=>'' - ]; - return $data; - } - private static function ItemRecord(){ $data = [ "#account_id" => myself()->_getAccountId(), diff --git a/webapp/services/RoomBattleDataService.php b/webapp/services/RoomBattleDataService.php index 03d6b7e0..f2dbb295 100644 --- a/webapp/services/RoomBattleDataService.php +++ b/webapp/services/RoomBattleDataService.php @@ -149,8 +149,8 @@ class RoomBattleDataService extends BaseService { } //金币模式检验 if ($this->mapMode == mt\MapMode::GOLD_MODE && - ($goldModeTimes >= $mapModeMeta['rewards_max_time'] )){ -// (!Hero::verifyValid($heroDb) || $goldModeTimes >= $mapModeMeta['rewards_max_time'] )){ +// ($goldModeTimes >= $mapModeMeta['rewards_max_time'] )){ + (!Hero::verifyValid($heroDb) || $goldModeTimes >= $mapModeMeta['rewards_max_time'] )){ error_log("金币模式:出战英雄没有打金时间或每日打金场次上限"); }else{ if (!empty($rewardMeta['goldLoot'])){ diff --git a/webapp/services/callback/BuyShopGoodsCbService.php b/webapp/services/callback/BuyShopGoodsCbService.php index e6f19794..8e6421d7 100644 --- a/webapp/services/callback/BuyShopGoodsCbService.php +++ b/webapp/services/callback/BuyShopGoodsCbService.php @@ -85,13 +85,6 @@ class BuyShopGoodsCbService } error_log("callback buynormal address: $address, order_id: $order_id, goods_id: $item_id, goods_num: $item_num"); - if ($item_id == V_ITEM_DIAMOND) { - $event = [ - 'name' => LogService::CEBG_TO_DIAMOND, - 'val' => $item_num - ]; - LogService::productDiamondCallback(['account_id' => $account_id], $event); - } $this->_addGoods($address, array( 'goods_id' => $item_id, diff --git a/webapp/services/callback/GameItemMallBuyOk.php b/webapp/services/callback/GameItemMallBuyOk.php index 27b1aa60..99325c2c 100644 --- a/webapp/services/callback/GameItemMallBuyOk.php +++ b/webapp/services/callback/GameItemMallBuyOk.php @@ -91,15 +91,6 @@ class GameItemMallBuyOk { )); $itemId = $orderDb['item_id']; $itemNum = $orderDb['item_num']; - if ($itemId == V_ITEM_DIAMOND) { - $event = [ - 'name' => LogService::CEBG_TO_DIAMOND, - 'val' => $itemNum - ]; - LogService::productDiamondCallback( - ['account_id' => $accountId], - $event); - } $itemService->addItemByAccountId($accountId, $itemId, $itemNum); myself()->_addLogEx($accountId, "shopBuyNormal", "end", array( 'param1' => $orderDb['order_id'], diff --git a/webapp/services/callback/InAppPurchase.php b/webapp/services/callback/InAppPurchase.php index df3fda6e..68119656 100644 --- a/webapp/services/callback/InAppPurchase.php +++ b/webapp/services/callback/InAppPurchase.php @@ -130,12 +130,6 @@ class InAppPurchase { $itemNum = $goodsMeta['item_num']; if ($itemId == V_ITEM_DIAMOND) { InAppRecord::addAmountOk($orderDb['account_id'], $orderDb['price']); - $event = [ - 'name' => LogService::RECHARGE_DIAMOND, - 'val' => $itemNum - ]; - error_log('InAppPurchase senditem ' . $itemId . ' ' . $itemNum); - LogService::productDiamondCallback(['account_id' => $orderDb['account_id']], $event); $addItemService = new ShopAddItemService(); $addItemService->addItemByAccountId($orderDb['account_id'], $itemId, $itemNum); myself()->_addLogEx($orderDb['account_id'], 'InAppPurchase', 'ok', diff --git a/webapp/services/callback/OutAppPurchase.php b/webapp/services/callback/OutAppPurchase.php index a7ba29c1..a6c94366 100644 --- a/webapp/services/callback/OutAppPurchase.php +++ b/webapp/services/callback/OutAppPurchase.php @@ -83,15 +83,6 @@ class OutAppPurchase { $itemMeta = mt\Item::get($itemId); if ($itemMeta && $itemNum > 0) { if ($itemId == V_ITEM_DIAMOND) { - $event = [ - 'name' => LogService::RECHARGE_CEBG_BONUS, - 'val' => $itemNum - ]; - LogService::productDiamondCallback( - array( - 'account_id' => $orderDb['account_id'] - ), - $event); $addItemService = new ShopAddItemService(); $addItemService->addItemByAccountId($orderDb['account_id'], $itemId, $itemNum); } else { diff --git a/webapp/services/callback/ShopInappPurchaseDiamonds.php b/webapp/services/callback/ShopInappPurchaseDiamonds.php index 42f575f2..0338abda 100644 --- a/webapp/services/callback/ShopInappPurchaseDiamonds.php +++ b/webapp/services/callback/ShopInappPurchaseDiamonds.php @@ -125,14 +125,6 @@ class ShopInappPurchaseDiamonds return; } - if ($item_id == V_ITEM_DIAMOND) { - $event = [ - 'name' => LogService::RECHARGE_DIAMOND, - 'val' => $item_num - ]; - LogService::productDiamondCallback(['account_id' => $account_id], $event); - } - $this->_addGoods($address, array( 'goods_id' => $item_id, 'goods_num' => $item_num, @@ -177,14 +169,6 @@ class ShopInappPurchaseDiamonds return; } - if ($item_id == V_ITEM_DIAMOND) { - $event = [ - 'name' => LogService::RECHARGE_DIAMOND, - 'val' => -$item_num - ]; - LogService::productDiamondCallback(['account_id' => $account_id], $event); - } - $this->_decGoods($address, array( 'goods_id' => $item_id, 'goods_num' => $item_num,