From 0d28c4b79b9a332b5dbb6ec2cf68d02cb9355826 Mon Sep 17 00:00:00 2001 From: hujiabin <519660157@qq.com> Date: Mon, 19 Aug 2024 17:02:32 +0800 Subject: [PATCH 1/3] 1 --- webapp/controller/BagController.class.php | 1 + webapp/controller/ChipController.class.php | 2 ++ webapp/controller/ChipPageController.class.php | 1 + webapp/controller/HashRateController.class.php | 1 + webapp/controller/HeroController.class.php | 2 ++ webapp/controller/HeroSkinController.class.php | 1 + webapp/controller/InGameMallController.class.php | 1 + webapp/controller/ShopController.class.php | 1 + 8 files changed, 10 insertions(+) diff --git a/webapp/controller/BagController.class.php b/webapp/controller/BagController.class.php index 1f8063eb..3b801b93 100644 --- a/webapp/controller/BagController.class.php +++ b/webapp/controller/BagController.class.php @@ -140,6 +140,7 @@ class BagController extends BaseAuthedController { } else if ($itemMeta['type'] == mt\Item::TREASURE_BOX) { $this->openTreasureBox($itemDb, $itemMeta, $itemNum); } else if ($itemMeta['type'] == mt\Item::BATTLE_REWARD_BOX) { + myself()->_verifySwitch('bigEventBoxOpen'); $this->openBattleBox($itemDb, $itemMeta, $itemNum); } else { $this->_rspErr(4, 'The prop function has not been realized yet'); diff --git a/webapp/controller/ChipController.class.php b/webapp/controller/ChipController.class.php index 9a14ac44..0c7de310 100644 --- a/webapp/controller/ChipController.class.php +++ b/webapp/controller/ChipController.class.php @@ -115,6 +115,7 @@ class ChipController extends BaseAuthedController } public function upgradeQualityS(){ + myself()->_verifySwitch('chipUp'); $chipUniId = getReqVal('chip_uniid', 0); $consumeUniIds = getReqVal('consume_uniids',0); $chipDb = Chip::find($chipUniId); @@ -214,6 +215,7 @@ class ChipController extends BaseAuthedController } public function synChipS(){ + myself()->_verifySwitch('chipPieceSyn'); $itemId = getReqVal('item_id',0); $itemNum = getReqVal('item_num',0); $needItem = \mt\Parameter::getVal('chip_craft_need_item',0); diff --git a/webapp/controller/ChipPageController.class.php b/webapp/controller/ChipPageController.class.php index 6eaf9f6d..6b55886f 100644 --- a/webapp/controller/ChipPageController.class.php +++ b/webapp/controller/ChipPageController.class.php @@ -36,6 +36,7 @@ class ChipPageController extends BaseAuthedController } public function unlockSlot(){ + myself()->_verifySwitch('openChipSlot'); $heroUid = getReqVal('hero_unnid',0); $slotId = getReqVal('slot_id',0); if ($slotId < 1 || $slotId > ChipPage::MAX_CHIP_SLOT_NUM){ diff --git a/webapp/controller/HashRateController.class.php b/webapp/controller/HashRateController.class.php index addafed5..93b34f97 100644 --- a/webapp/controller/HashRateController.class.php +++ b/webapp/controller/HashRateController.class.php @@ -17,6 +17,7 @@ class HashRateController extends BaseAuthedController parent::_handlePre(); $this->hashRateService = new services\HashRateService(); $this->hashRateService->init(); + myself()->_verifySwitch('hashrate'); } public function taskList(){ diff --git a/webapp/controller/HeroController.class.php b/webapp/controller/HeroController.class.php index d87cfd4f..daeee408 100644 --- a/webapp/controller/HeroController.class.php +++ b/webapp/controller/HeroController.class.php @@ -74,6 +74,7 @@ class HeroController extends BaseAuthedController { } public function synHeroS(){ + myself()->_verifySwitch('heroPieceSyn'); $itemId = getReqVal('item_id',0); $itemNum = getReqVal('item_num',0); $itemMeta = \mt\Item::get($itemId); @@ -137,6 +138,7 @@ class HeroController extends BaseAuthedController { } public function upgradeQualityS(){ + myself()->_verifySwitch('heroUp'); $heroUniId = getReqVal('hero_uniid', 0); $itemId = getReqVal('item_id',0); $itemNum = max(0,getReqVal('item_num',0)); diff --git a/webapp/controller/HeroSkinController.class.php b/webapp/controller/HeroSkinController.class.php index c5a451ae..f887fe93 100644 --- a/webapp/controller/HeroSkinController.class.php +++ b/webapp/controller/HeroSkinController.class.php @@ -188,6 +188,7 @@ class HeroSkinController extends BaseAuthedController { } public function synSkinS(){ + myself()->_verifySwitch('skinSyn'); $itemId = getReqVal('item_id',0); $itemNum = getReqVal('item_num',0); $itemMeta = \mt\Item::get($itemId); diff --git a/webapp/controller/InGameMallController.class.php b/webapp/controller/InGameMallController.class.php index abcd099a..ab138804 100644 --- a/webapp/controller/InGameMallController.class.php +++ b/webapp/controller/InGameMallController.class.php @@ -43,6 +43,7 @@ class InGameMallController extends BaseAuthedController { { parent::_handlePre(); $this->mailApiService = new \services\MailApiService(); + myself()->_verifySwitch('ingameMall'); } public function productList() diff --git a/webapp/controller/ShopController.class.php b/webapp/controller/ShopController.class.php index 25064759..1f054cfd 100644 --- a/webapp/controller/ShopController.class.php +++ b/webapp/controller/ShopController.class.php @@ -46,6 +46,7 @@ class ShopController extends BaseAuthedController { public function buyGoodsS() { + myself()->_verifySwitch('shop.buy'); $goodsId = getReqVal('goods_id', 0); $goodsNum = getReqVal('goods_num', 0); From d7b3b5b6a6ba371f5a0165c93daf76fe98eee01a Mon Sep 17 00:00:00 2001 From: hujiabin <519660157@qq.com> Date: Mon, 19 Aug 2024 17:08:35 +0800 Subject: [PATCH 2/3] 1 --- webapp/controller/BlockChainController.class.php | 3 --- webapp/controller/MailController.class.php | 1 - webapp/controller/OtherController.class.php | 2 +- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/webapp/controller/BlockChainController.class.php b/webapp/controller/BlockChainController.class.php index 771858c8..0279d6bd 100644 --- a/webapp/controller/BlockChainController.class.php +++ b/webapp/controller/BlockChainController.class.php @@ -41,7 +41,6 @@ class BlockChainController extends BaseAuthedController { ))); return; } - error_log(json_encode($_REQUEST)); } public function active721Nft() @@ -216,7 +215,6 @@ class BlockChainController extends BaseAuthedController { 'is_mint' => $isMint ? 1 : 0, 'net_id' => NET_ID ); - error_log(json_encode($params)); { $url = self::getWeb3ServiceUrl(); $response = ''; @@ -228,7 +226,6 @@ class BlockChainController extends BaseAuthedController { die(); return; } - error_log($response); $rspObj = json_decode($response, true); if ($rspObj['errcode'] == 0) { $transId = $rspObj['trans_id']; diff --git a/webapp/controller/MailController.class.php b/webapp/controller/MailController.class.php index ba7ce64a..62a49bd0 100644 --- a/webapp/controller/MailController.class.php +++ b/webapp/controller/MailController.class.php @@ -33,7 +33,6 @@ class MailController extends BaseAuthedController { myself()->_rspErr(500, 'server internal error 4, url:'); return; } - error_log(json_encode($dataJson)); if ($dataJson['account_id'] != myself()->_getAccountId()) { myself()->_rspErr(500, 'server internal error 2, url:'); return; diff --git a/webapp/controller/OtherController.class.php b/webapp/controller/OtherController.class.php index ec958949..10c10b82 100644 --- a/webapp/controller/OtherController.class.php +++ b/webapp/controller/OtherController.class.php @@ -373,7 +373,7 @@ class OtherController extends BaseAuthedController { 'model' => $packageId )); $examining = !empty($row) && $row['version'] == $version && $row['is_auditing'] ? 1 : 0; - $con = ServerSwitchService::getGameSwitch(); + $con = services\ServerSwitchService::getGameSwitch(); $this->_rspData(array( 'data' => $examining ? $con['auditing'] : $con['normal'] )); From 66007b6e0f076c49115aa6573ecbbd7b80fd4c4a Mon Sep 17 00:00:00 2001 From: hujiabin <519660157@qq.com> Date: Mon, 19 Aug 2024 17:23:32 +0800 Subject: [PATCH 3/3] 1 --- webapp/controller/BagController.class.php | 2 -- webapp/controller/BaseAuthedController.class.php | 1 - webapp/controller/BattleDataController.class.php | 11 ----------- webapp/controller/BigwheelController.class.php | 3 --- webapp/controller/EventRankingController.class.php | 11 +---------- webapp/controller/OutAppMintController.class.php | 7 ------- webapp/controller/OutAppNftController.class.php | 1 - webapp/controller/ToolsController.class.php | 14 +++++++------- webapp/controller/UnitTestController.class.php | 2 +- webapp/controller/UserController.class.php | 2 +- webapp/services/BattleDataService.php | 2 +- webapp/services/BigwheelService.php | 2 +- webapp/services/FormulaService.php | 4 ++-- webapp/services/MissionService.php | 10 +++++----- webapp/services/NoticeService.php | 2 +- 15 files changed, 20 insertions(+), 54 deletions(-) diff --git a/webapp/controller/BagController.class.php b/webapp/controller/BagController.class.php index 3b801b93..25f7d73e 100644 --- a/webapp/controller/BagController.class.php +++ b/webapp/controller/BagController.class.php @@ -162,7 +162,6 @@ class BagController extends BaseAuthedController { return; } $itemDto = Bag::findByType(mt\Item::FUNC_TYPE, mt\Item::FUNC_RENAME_CARD_SUBTYPE); - error_log(json_encode($itemDto)); if (!$itemDto || $itemDto['item_num'] < 0) { $this->_rspErr(1, 'Not enough item'); return; @@ -321,7 +320,6 @@ class BagController extends BaseAuthedController { return; } $costItems = mt\Item::getUseCostItems($itemMeta); - error_log(json_encode($costItems)); $lackItem = null; if (!$this->_hasEnoughItems($costItems, $lackItem)) { $this->_rspErr(3, $this->_getLackItemErrMsg($lackItem)); diff --git a/webapp/controller/BaseAuthedController.class.php b/webapp/controller/BaseAuthedController.class.php index f454dd1d..d96f4a9b 100644 --- a/webapp/controller/BaseAuthedController.class.php +++ b/webapp/controller/BaseAuthedController.class.php @@ -130,7 +130,6 @@ class BaseAuthedController extends BaseController { return; } $sessionId = $r->get(LAST_SESSION_KEY . $this->_getAccountId()); - // error_log('SERVER_ENV:' . SERVER_ENV . '_DEBUG:' . _DEBUG); if (SERVER_ENV != _DEBUG) { if (empty($sessionId)) { diff --git a/webapp/controller/BattleDataController.class.php b/webapp/controller/BattleDataController.class.php index eefa4b6a..b3e2fe29 100644 --- a/webapp/controller/BattleDataController.class.php +++ b/webapp/controller/BattleDataController.class.php @@ -72,16 +72,10 @@ class BattleDataController extends BaseAuthedController { return; } $data = json_decode(file_get_contents('php://input'), true); - /*error_log(json_encode(array( - 'a' => 'battleReport', - 'post_data' => $data - )));*/ - $teamList = array(); if ($data) { $teamList = $data['team_list']; } -// error_log(json_encode($teamList)); $battleDataService = new services\BattleDataService(); $battleDataService->teamList = $teamList; $battleDataService->updateBattleData(); @@ -95,7 +89,6 @@ class BattleDataController extends BaseAuthedController { 'modifytime' => $this->_getNowTime(), ) ); -// error_log(json_encode($battleDataService->getReward())); $data = array( 'reward' => $battleDataService->getReward() ); @@ -413,7 +406,6 @@ class BattleDataController extends BaseAuthedController { public function getBattleData() { - error_log(json_encode($_REQUEST)); $data = array( 'members' => array() ); @@ -970,7 +962,6 @@ class BattleDataController extends BaseAuthedController { public function getBattleDataNew() { - error_log(json_encode($_REQUEST)); $members = json_decode(getReqVal('members', ''), true); $data = array( 'members' => array() @@ -1188,7 +1179,6 @@ class BattleDataController extends BaseAuthedController { public function requestAllocBoxNum() { - error_log(json_encode($_REQUEST)); $roomUuid = getReqVal('room_uuid', ''); $row = SqlHelper::ormSelectOne( $this->_getSelfMysql(), @@ -1245,7 +1235,6 @@ class BattleDataController extends BaseAuthedController { public function requestReturnBoxNum() { - error_log(json_encode($_REQUEST)); $roomUuid = getReqVal('room_uuid', ''); $usedNum = getReqVal('used_num', 0); $allocBoxNum = getReqVal('alloc_box_num', 0); diff --git a/webapp/controller/BigwheelController.class.php b/webapp/controller/BigwheelController.class.php index f0cc1e54..6a4a4e9d 100644 --- a/webapp/controller/BigwheelController.class.php +++ b/webapp/controller/BigwheelController.class.php @@ -300,7 +300,6 @@ class BigwheelController extends BaseAuthedController { $gridRef = null; $gridId = getReqVal('grid_id', 0); $this->getGridRefByGridId($data, $gridId, $gridRef); - error_log(json_encode($gridRef)); if (empty($gridRef) || $gridRef['grid_state'] != 2) { myself()->_rspErr(1, 'cant buy'); @@ -324,8 +323,6 @@ class BigwheelController extends BaseAuthedController { $grid['grid_state'] = 1; } } - error_log(json_encode($gridRef)); - error_log(json_encode($data)); myself()->_callModelStatic('MidData', 'setData', $key, json_encode($data)); $this->awardService->addItem($gridRef['item_id'], $gridRef['item_num']); $this->propertyChgService->addUserChg(); diff --git a/webapp/controller/EventRankingController.class.php b/webapp/controller/EventRankingController.class.php index e9701a30..46eb8805 100644 --- a/webapp/controller/EventRankingController.class.php +++ b/webapp/controller/EventRankingController.class.php @@ -193,16 +193,7 @@ class EventRankingController extends BaseAuthedController 'rows' => $rankingList, 'my_ranked' => $this->myRanked ); -// error_log(json_encode( -// array( -// 'account_id'=>$userInfo['account_id'], -// 'guild_id'=>$userInfo['guild_id'], -// 'type' => $type, -// 'pages' => $pages, -// 'rows' => $rankingList, -// 'my_ranked' => $this->myRanked -// ) -// )); + return $rankingData; } diff --git a/webapp/controller/OutAppMintController.class.php b/webapp/controller/OutAppMintController.class.php index e91c899a..bf0e0216 100644 --- a/webapp/controller/OutAppMintController.class.php +++ b/webapp/controller/OutAppMintController.class.php @@ -19,17 +19,12 @@ class OutAppMintController extends BaseController { public function mintHero() { myself()->_verifySwitch('heroMint'); - error_log(json_encode($_REQUEST)); $accountId = getReqVal('account_id', ''); //$accountAddress = User::findUserAddress($accountId); //$accountAddress = '0x0c6c7399f1b6b19e96950ef294685bfd0dc46434'; $accountAddress = getReqVal('account_address', ''); $toAddress = getReqVal('to_address', ''); $uniid = getReqVal('uniid', 0); - error_log(json_encode(array( - 'accoutn_id' => $accountId, - 'uuid' => $uniid - ))); $userDb = User::find($accountId); if (empty($userDb)) { myself()->_rspErr(1, 'user not found'); @@ -89,7 +84,6 @@ class OutAppMintController extends BaseController { 'to_address' => $toAddress, 'net_id' => NET_ID ); - error_log(json_encode($params)); { $url = self::getWeb3ServiceUrl(); $response = ''; @@ -101,7 +95,6 @@ class OutAppMintController extends BaseController { die(); return; } - error_log($response); $rspObj = json_decode($response, true); if ($rspObj['errcode'] == 0) { myself()->_rspData(array( diff --git a/webapp/controller/OutAppNftController.class.php b/webapp/controller/OutAppNftController.class.php index 06d886a7..e9bc758c 100644 --- a/webapp/controller/OutAppNftController.class.php +++ b/webapp/controller/OutAppNftController.class.php @@ -106,7 +106,6 @@ class OutAppNftController extends BaseController { $this->_rspData(array( 'has_any_nft' => $ret ? 1 : 0, )); - error_log(2222); } public function nftMetaView() diff --git a/webapp/controller/ToolsController.class.php b/webapp/controller/ToolsController.class.php index 500b5d75..24cdda7b 100644 --- a/webapp/controller/ToolsController.class.php +++ b/webapp/controller/ToolsController.class.php @@ -136,10 +136,10 @@ class ToolsController extends BaseController { { $accountId1 = getReqVal('account_id1', ''); $accountId2 = getReqVal('account_id2', ''); - error_log(phpcommon\extractOpenId($accountId1)); - error_log(phpcommon\extractRealOpenId(phpcommon\extractOpenId($accountId1))); - error_log($accountId1 . ' **** ' . $accountId2 . ' ' . - phpcommon\isSameSeriesAccount($accountId1, $accountId2)); +// error_log(phpcommon\extractOpenId($accountId1)); +// error_log(phpcommon\extractRealOpenId(phpcommon\extractOpenId($accountId1))); +// error_log($accountId1 . ' **** ' . $accountId2 . ' ' . +// phpcommon\isSameSeriesAccount($accountId1, $accountId2)); myself()->_rspData(array( )); @@ -195,7 +195,7 @@ class ToolsController extends BaseController { ($url, $params, $response)) { - error_log($response); +// error_log($response); myself()->_rspErr(500, 'server internal error 3, url:' . $url); die(); return; @@ -231,7 +231,7 @@ class ToolsController extends BaseController { } $signStr = implode('&', $arrSign); $sign = hash_hmac('sha256', $signStr, BUY_SERVER_PKEY); - error_log($signStr . BUY_SERVER_PKEY . '|!' . $sign); +// error_log($signStr . BUY_SERVER_PKEY . '|!' . $sign); $params['sign'] = $sign; } $url = "https://game2006api-test.kingsome.cn/webapp/index.php?"; @@ -240,7 +240,7 @@ class ToolsController extends BaseController { ($url, $params, $response)) { - error_log($response); +// error_log($response); myself()->_rspErr(500, 'server internal error 3, url:' . $url); die(); return; diff --git a/webapp/controller/UnitTestController.class.php b/webapp/controller/UnitTestController.class.php index d894b2b0..4e8adda5 100644 --- a/webapp/controller/UnitTestController.class.php +++ b/webapp/controller/UnitTestController.class.php @@ -36,7 +36,7 @@ class UnitTestController extends BaseAuthedController { myself()->_callServiceStatic('NoticeService', 'send', $content, $loop, $interval); //services\NoticeService::send($content, $loop, $interval); } catch (Exception $e){ - error_log($e); + error_log('testNotice:' . $e); } } diff --git a/webapp/controller/UserController.class.php b/webapp/controller/UserController.class.php index 68be54d1..33e30d0c 100644 --- a/webapp/controller/UserController.class.php +++ b/webapp/controller/UserController.class.php @@ -804,7 +804,7 @@ class UserController extends BaseAuthedController { )); return; } - error_log($response); +// error_log($response); if (empty($response)) { echo json_encode(array( 'errcode' => 500, diff --git a/webapp/services/BattleDataService.php b/webapp/services/BattleDataService.php index 46565933..40698d00 100644 --- a/webapp/services/BattleDataService.php +++ b/webapp/services/BattleDataService.php @@ -1164,7 +1164,7 @@ class BattleDataService extends BaseService { private function randWeight($items) { - error_log(json_encode($items)); +// error_log(json_encode($items)); $weights = array(); { $weight = 0; diff --git a/webapp/services/BigwheelService.php b/webapp/services/BigwheelService.php index 421e125d..744fe6f9 100644 --- a/webapp/services/BigwheelService.php +++ b/webapp/services/BigwheelService.php @@ -60,7 +60,7 @@ class BigwheelService extends BaseService 'lang_key' => 'Marquee_rewards_get_3', 'lang_params' => array(), )); - error_log(json_encode($elements)); +// error_log(json_encode($elements)); $content = myself()->_callServiceStatic('NoticeService', 'buildCustom', $elements); $loop = 1; $interval = 1; diff --git a/webapp/services/FormulaService.php b/webapp/services/FormulaService.php index fdb67e81..49d4049b 100644 --- a/webapp/services/FormulaService.php +++ b/webapp/services/FormulaService.php @@ -201,7 +201,7 @@ class FormulaService extends BaseService { $dropRate * ($instanceRankRate + $bossReward*0.2) * pow(2, $todayPveBattleTimes - $todayPveLastGetFragmentBattle - 1), 1); error_log('calcHeroFragmentProbabilityPve:' . $heroProbability . ' dropRate:' . $dropRate); - error_log(json_encode(func_get_args())); +// error_log(json_encode(func_get_args())); return max(0, $heroProbability); } @@ -222,7 +222,7 @@ class FormulaService extends BaseService { $gunProbability = min($gunFragmentNum / $onlineNum * $dropRate * ($instanceRankRate + $bossReward*0.2) * pow(2, $todayPveBattleTimes - $todayPveLastGetFragmentBattle - 1), 1); - error_log(json_encode(func_get_args())); +// error_log(json_encode(func_get_args())); return max(0, $gunProbability); } diff --git a/webapp/services/MissionService.php b/webapp/services/MissionService.php index 182e6a52..cf692d54 100644 --- a/webapp/services/MissionService.php +++ b/webapp/services/MissionService.php @@ -537,7 +537,7 @@ class MissionService extends BaseService { $missionDto['state'] = Mission::RECEIVEABLE_STATE; } if (!$handled) { - error_log(json_encode($missionDto)); +// error_log(json_encode($missionDto)); } //$missionDto['state'] = Mission::RECEIVEABLE_STATE; return $missionDto; @@ -1141,12 +1141,12 @@ class MissionService extends BaseService { } } } - error_log(json_encode($mission)); +// error_log(json_encode($mission)); $this->offerRewartdMission['missions'][$idx] = $mission; $this->saveOfferRewardMission(); $propertyChgService->addHeroChg(); $propertyChgService->addGunChg(); - error_log(json_encode($this->offerRewartdMission)); +// error_log(json_encode($this->offerRewartdMission)); myself()->_rspData([ 'property_chg' => $propertyChgService->toDto(), ]); @@ -1169,7 +1169,7 @@ class MissionService extends BaseService { foreach ($strings as $str){ $strings2 = explode(':', $str); if (count($strings2) < 2) { - error_log(json_encode($_REQUEST)); +// error_log(json_encode($_REQUEST)); continue; } array_push($objects, @@ -1228,7 +1228,7 @@ class MissionService extends BaseService { } $mission['sendtime'] = 0; $mission['objects'] = array(); - error_log(json_encode($mission)); +// error_log(json_encode($mission)); } } $this->saveOfferRewardMission(); diff --git a/webapp/services/NoticeService.php b/webapp/services/NoticeService.php index 225681e2..da4d45d5 100644 --- a/webapp/services/NoticeService.php +++ b/webapp/services/NoticeService.php @@ -74,7 +74,7 @@ class NoticeService extends BaseService { phpcommon\HttpClient::postContentEx($url, $params, json_encode($data), $response, ['Content-Type: application/json']); if (SERVER_ENV != _ONLINE) { - error_log($response); +// error_log($response); } } } \ No newline at end of file