This commit is contained in:
aozhiwei 2024-08-19 17:26:02 +08:00
commit 28233e975c
25 changed files with 31 additions and 59 deletions

View File

@ -140,6 +140,7 @@ class BagController extends BaseAuthedController {
} else if ($itemMeta['type'] == mt\Item::TREASURE_BOX) { } else if ($itemMeta['type'] == mt\Item::TREASURE_BOX) {
$this->openTreasureBox($itemDb, $itemMeta, $itemNum); $this->openTreasureBox($itemDb, $itemMeta, $itemNum);
} else if ($itemMeta['type'] == mt\Item::BATTLE_REWARD_BOX) { } else if ($itemMeta['type'] == mt\Item::BATTLE_REWARD_BOX) {
myself()->_verifySwitch('bigEventBoxOpen');
$this->openBattleBox($itemDb, $itemMeta, $itemNum); $this->openBattleBox($itemDb, $itemMeta, $itemNum);
} else { } else {
$this->_rspErr(4, 'The prop function has not been realized yet'); $this->_rspErr(4, 'The prop function has not been realized yet');
@ -161,7 +162,6 @@ class BagController extends BaseAuthedController {
return; return;
} }
$itemDto = Bag::findByType(mt\Item::FUNC_TYPE, mt\Item::FUNC_RENAME_CARD_SUBTYPE); $itemDto = Bag::findByType(mt\Item::FUNC_TYPE, mt\Item::FUNC_RENAME_CARD_SUBTYPE);
error_log(json_encode($itemDto));
if (!$itemDto || $itemDto['item_num'] < 0) { if (!$itemDto || $itemDto['item_num'] < 0) {
$this->_rspErr(1, 'Not enough item'); $this->_rspErr(1, 'Not enough item');
return; return;
@ -320,7 +320,6 @@ class BagController extends BaseAuthedController {
return; return;
} }
$costItems = mt\Item::getUseCostItems($itemMeta); $costItems = mt\Item::getUseCostItems($itemMeta);
error_log(json_encode($costItems));
$lackItem = null; $lackItem = null;
if (!$this->_hasEnoughItems($costItems, $lackItem)) { if (!$this->_hasEnoughItems($costItems, $lackItem)) {
$this->_rspErr(3, $this->_getLackItemErrMsg($lackItem)); $this->_rspErr(3, $this->_getLackItemErrMsg($lackItem));

View File

@ -130,7 +130,6 @@ class BaseAuthedController extends BaseController {
return; return;
} }
$sessionId = $r->get(LAST_SESSION_KEY . $this->_getAccountId()); $sessionId = $r->get(LAST_SESSION_KEY . $this->_getAccountId());
// error_log('SERVER_ENV:' . SERVER_ENV . '_DEBUG:' . _DEBUG);
if (SERVER_ENV != _DEBUG) if (SERVER_ENV != _DEBUG)
{ {
if (empty($sessionId)) { if (empty($sessionId)) {

View File

@ -72,16 +72,10 @@ class BattleDataController extends BaseAuthedController {
return; return;
} }
$data = json_decode(file_get_contents('php://input'), true); $data = json_decode(file_get_contents('php://input'), true);
/*error_log(json_encode(array(
'a' => 'battleReport',
'post_data' => $data
)));*/
$teamList = array(); $teamList = array();
if ($data) { if ($data) {
$teamList = $data['team_list']; $teamList = $data['team_list'];
} }
// error_log(json_encode($teamList));
$battleDataService = new services\BattleDataService(); $battleDataService = new services\BattleDataService();
$battleDataService->teamList = $teamList; $battleDataService->teamList = $teamList;
$battleDataService->updateBattleData(); $battleDataService->updateBattleData();
@ -95,7 +89,6 @@ class BattleDataController extends BaseAuthedController {
'modifytime' => $this->_getNowTime(), 'modifytime' => $this->_getNowTime(),
) )
); );
// error_log(json_encode($battleDataService->getReward()));
$data = array( $data = array(
'reward' => $battleDataService->getReward() 'reward' => $battleDataService->getReward()
); );
@ -413,7 +406,6 @@ class BattleDataController extends BaseAuthedController {
public function getBattleData() public function getBattleData()
{ {
error_log(json_encode($_REQUEST));
$data = array( $data = array(
'members' => array() 'members' => array()
); );
@ -970,7 +962,6 @@ class BattleDataController extends BaseAuthedController {
public function getBattleDataNew() public function getBattleDataNew()
{ {
error_log(json_encode($_REQUEST));
$members = json_decode(getReqVal('members', ''), true); $members = json_decode(getReqVal('members', ''), true);
$data = array( $data = array(
'members' => array() 'members' => array()
@ -1188,7 +1179,6 @@ class BattleDataController extends BaseAuthedController {
public function requestAllocBoxNum() public function requestAllocBoxNum()
{ {
error_log(json_encode($_REQUEST));
$roomUuid = getReqVal('room_uuid', ''); $roomUuid = getReqVal('room_uuid', '');
$row = SqlHelper::ormSelectOne( $row = SqlHelper::ormSelectOne(
$this->_getSelfMysql(), $this->_getSelfMysql(),
@ -1245,7 +1235,6 @@ class BattleDataController extends BaseAuthedController {
public function requestReturnBoxNum() public function requestReturnBoxNum()
{ {
error_log(json_encode($_REQUEST));
$roomUuid = getReqVal('room_uuid', ''); $roomUuid = getReqVal('room_uuid', '');
$usedNum = getReqVal('used_num', 0); $usedNum = getReqVal('used_num', 0);
$allocBoxNum = getReqVal('alloc_box_num', 0); $allocBoxNum = getReqVal('alloc_box_num', 0);

View File

@ -300,7 +300,6 @@ class BigwheelController extends BaseAuthedController {
$gridRef = null; $gridRef = null;
$gridId = getReqVal('grid_id', 0); $gridId = getReqVal('grid_id', 0);
$this->getGridRefByGridId($data, $gridId, $gridRef); $this->getGridRefByGridId($data, $gridId, $gridRef);
error_log(json_encode($gridRef));
if (empty($gridRef) || if (empty($gridRef) ||
$gridRef['grid_state'] != 2) { $gridRef['grid_state'] != 2) {
myself()->_rspErr(1, 'cant buy'); myself()->_rspErr(1, 'cant buy');
@ -324,8 +323,6 @@ class BigwheelController extends BaseAuthedController {
$grid['grid_state'] = 1; $grid['grid_state'] = 1;
} }
} }
error_log(json_encode($gridRef));
error_log(json_encode($data));
myself()->_callModelStatic('MidData', 'setData', $key, json_encode($data)); myself()->_callModelStatic('MidData', 'setData', $key, json_encode($data));
$this->awardService->addItem($gridRef['item_id'], $gridRef['item_num']); $this->awardService->addItem($gridRef['item_id'], $gridRef['item_num']);
$this->propertyChgService->addUserChg(); $this->propertyChgService->addUserChg();

View File

@ -41,7 +41,6 @@ class BlockChainController extends BaseAuthedController {
))); )));
return; return;
} }
error_log(json_encode($_REQUEST));
} }
public function active721Nft() public function active721Nft()
@ -216,7 +215,6 @@ class BlockChainController extends BaseAuthedController {
'is_mint' => $isMint ? 1 : 0, 'is_mint' => $isMint ? 1 : 0,
'net_id' => NET_ID 'net_id' => NET_ID
); );
error_log(json_encode($params));
{ {
$url = self::getWeb3ServiceUrl(); $url = self::getWeb3ServiceUrl();
$response = ''; $response = '';
@ -228,7 +226,6 @@ class BlockChainController extends BaseAuthedController {
die(); die();
return; return;
} }
error_log($response);
$rspObj = json_decode($response, true); $rspObj = json_decode($response, true);
if ($rspObj['errcode'] == 0) { if ($rspObj['errcode'] == 0) {
$transId = $rspObj['trans_id']; $transId = $rspObj['trans_id'];

View File

@ -115,6 +115,7 @@ class ChipController extends BaseAuthedController
} }
public function upgradeQualityS(){ public function upgradeQualityS(){
myself()->_verifySwitch('chipUp');
$chipUniId = getReqVal('chip_uniid', 0); $chipUniId = getReqVal('chip_uniid', 0);
$consumeUniIds = getReqVal('consume_uniids',0); $consumeUniIds = getReqVal('consume_uniids',0);
$chipDb = Chip::find($chipUniId); $chipDb = Chip::find($chipUniId);
@ -214,6 +215,7 @@ class ChipController extends BaseAuthedController
} }
public function synChipS(){ public function synChipS(){
myself()->_verifySwitch('chipPieceSyn');
$itemId = getReqVal('item_id',0); $itemId = getReqVal('item_id',0);
$itemNum = getReqVal('item_num',0); $itemNum = getReqVal('item_num',0);
$needItem = \mt\Parameter::getVal('chip_craft_need_item',0); $needItem = \mt\Parameter::getVal('chip_craft_need_item',0);

View File

@ -36,6 +36,7 @@ class ChipPageController extends BaseAuthedController
} }
public function unlockSlot(){ public function unlockSlot(){
myself()->_verifySwitch('openChipSlot');
$heroUid = getReqVal('hero_unnid',0); $heroUid = getReqVal('hero_unnid',0);
$slotId = getReqVal('slot_id',0); $slotId = getReqVal('slot_id',0);
if ($slotId < 1 || $slotId > ChipPage::MAX_CHIP_SLOT_NUM){ if ($slotId < 1 || $slotId > ChipPage::MAX_CHIP_SLOT_NUM){

View File

@ -193,16 +193,7 @@ class EventRankingController extends BaseAuthedController
'rows' => $rankingList, 'rows' => $rankingList,
'my_ranked' => $this->myRanked '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; return $rankingData;
} }

View File

@ -17,6 +17,7 @@ class HashRateController extends BaseAuthedController
parent::_handlePre(); parent::_handlePre();
$this->hashRateService = new services\HashRateService(); $this->hashRateService = new services\HashRateService();
$this->hashRateService->init(); $this->hashRateService->init();
myself()->_verifySwitch('hashrate');
} }
public function taskList(){ public function taskList(){

View File

@ -74,6 +74,7 @@ class HeroController extends BaseAuthedController {
} }
public function synHeroS(){ public function synHeroS(){
myself()->_verifySwitch('heroPieceSyn');
$itemId = getReqVal('item_id',0); $itemId = getReqVal('item_id',0);
$itemNum = getReqVal('item_num',0); $itemNum = getReqVal('item_num',0);
$itemMeta = \mt\Item::get($itemId); $itemMeta = \mt\Item::get($itemId);
@ -137,6 +138,7 @@ class HeroController extends BaseAuthedController {
} }
public function upgradeQualityS(){ public function upgradeQualityS(){
myself()->_verifySwitch('heroUp');
$heroUniId = getReqVal('hero_uniid', 0); $heroUniId = getReqVal('hero_uniid', 0);
$itemId = getReqVal('item_id',0); $itemId = getReqVal('item_id',0);
$itemNum = max(0,getReqVal('item_num',0)); $itemNum = max(0,getReqVal('item_num',0));

View File

@ -188,6 +188,7 @@ class HeroSkinController extends BaseAuthedController {
} }
public function synSkinS(){ public function synSkinS(){
myself()->_verifySwitch('skinSyn');
$itemId = getReqVal('item_id',0); $itemId = getReqVal('item_id',0);
$itemNum = getReqVal('item_num',0); $itemNum = getReqVal('item_num',0);
$itemMeta = \mt\Item::get($itemId); $itemMeta = \mt\Item::get($itemId);

View File

@ -43,6 +43,7 @@ class InGameMallController extends BaseAuthedController {
{ {
parent::_handlePre(); parent::_handlePre();
$this->mailApiService = new \services\MailApiService(); $this->mailApiService = new \services\MailApiService();
myself()->_verifySwitch('ingameMall');
} }
public function productList() public function productList()

View File

@ -33,7 +33,6 @@ class MailController extends BaseAuthedController {
myself()->_rspErr(500, 'server internal error 4, url:'); myself()->_rspErr(500, 'server internal error 4, url:');
return; return;
} }
error_log(json_encode($dataJson));
if ($dataJson['account_id'] != myself()->_getAccountId()) { if ($dataJson['account_id'] != myself()->_getAccountId()) {
myself()->_rspErr(500, 'server internal error 2, url:'); myself()->_rspErr(500, 'server internal error 2, url:');
return; return;

View File

@ -373,7 +373,7 @@ class OtherController extends BaseAuthedController {
'model' => $packageId 'model' => $packageId
)); ));
$examining = !empty($row) && $row['version'] == $version && $row['is_auditing'] ? 1 : 0; $examining = !empty($row) && $row['version'] == $version && $row['is_auditing'] ? 1 : 0;
$con = ServerSwitchService::getGameSwitch(); $con = services\ServerSwitchService::getGameSwitch();
$this->_rspData(array( $this->_rspData(array(
'data' => $examining ? $con['auditing'] : $con['normal'] 'data' => $examining ? $con['auditing'] : $con['normal']
)); ));

View File

@ -19,17 +19,12 @@ class OutAppMintController extends BaseController {
public function mintHero() public function mintHero()
{ {
myself()->_verifySwitch('heroMint'); myself()->_verifySwitch('heroMint');
error_log(json_encode($_REQUEST));
$accountId = getReqVal('account_id', ''); $accountId = getReqVal('account_id', '');
//$accountAddress = User::findUserAddress($accountId); //$accountAddress = User::findUserAddress($accountId);
//$accountAddress = '0x0c6c7399f1b6b19e96950ef294685bfd0dc46434'; //$accountAddress = '0x0c6c7399f1b6b19e96950ef294685bfd0dc46434';
$accountAddress = getReqVal('account_address', ''); $accountAddress = getReqVal('account_address', '');
$toAddress = getReqVal('to_address', ''); $toAddress = getReqVal('to_address', '');
$uniid = getReqVal('uniid', 0); $uniid = getReqVal('uniid', 0);
error_log(json_encode(array(
'accoutn_id' => $accountId,
'uuid' => $uniid
)));
$userDb = User::find($accountId); $userDb = User::find($accountId);
if (empty($userDb)) { if (empty($userDb)) {
myself()->_rspErr(1, 'user not found'); myself()->_rspErr(1, 'user not found');
@ -89,7 +84,6 @@ class OutAppMintController extends BaseController {
'to_address' => $toAddress, 'to_address' => $toAddress,
'net_id' => NET_ID 'net_id' => NET_ID
); );
error_log(json_encode($params));
{ {
$url = self::getWeb3ServiceUrl(); $url = self::getWeb3ServiceUrl();
$response = ''; $response = '';
@ -101,7 +95,6 @@ class OutAppMintController extends BaseController {
die(); die();
return; return;
} }
error_log($response);
$rspObj = json_decode($response, true); $rspObj = json_decode($response, true);
if ($rspObj['errcode'] == 0) { if ($rspObj['errcode'] == 0) {
myself()->_rspData(array( myself()->_rspData(array(

View File

@ -106,7 +106,6 @@ class OutAppNftController extends BaseController {
$this->_rspData(array( $this->_rspData(array(
'has_any_nft' => $ret ? 1 : 0, 'has_any_nft' => $ret ? 1 : 0,
)); ));
error_log(2222);
} }
public function nftMetaView() public function nftMetaView()

View File

@ -46,6 +46,7 @@ class ShopController extends BaseAuthedController {
public function buyGoodsS() public function buyGoodsS()
{ {
myself()->_verifySwitch('shop.buy');
$goodsId = getReqVal('goods_id', 0); $goodsId = getReqVal('goods_id', 0);
$goodsNum = getReqVal('goods_num', 0); $goodsNum = getReqVal('goods_num', 0);

View File

@ -136,10 +136,10 @@ class ToolsController extends BaseController {
{ {
$accountId1 = getReqVal('account_id1', ''); $accountId1 = getReqVal('account_id1', '');
$accountId2 = getReqVal('account_id2', ''); $accountId2 = getReqVal('account_id2', '');
error_log(phpcommon\extractOpenId($accountId1)); // error_log(phpcommon\extractOpenId($accountId1));
error_log(phpcommon\extractRealOpenId(phpcommon\extractOpenId($accountId1))); // error_log(phpcommon\extractRealOpenId(phpcommon\extractOpenId($accountId1)));
error_log($accountId1 . ' **** ' . $accountId2 . ' ' . // error_log($accountId1 . ' **** ' . $accountId2 . ' ' .
phpcommon\isSameSeriesAccount($accountId1, $accountId2)); // phpcommon\isSameSeriesAccount($accountId1, $accountId2));
myself()->_rspData(array( myself()->_rspData(array(
)); ));
@ -195,7 +195,7 @@ class ToolsController extends BaseController {
($url, ($url,
$params, $params,
$response)) { $response)) {
error_log($response); // error_log($response);
myself()->_rspErr(500, 'server internal error 3, url:' . $url); myself()->_rspErr(500, 'server internal error 3, url:' . $url);
die(); die();
return; return;
@ -231,7 +231,7 @@ class ToolsController extends BaseController {
} }
$signStr = implode('&', $arrSign); $signStr = implode('&', $arrSign);
$sign = hash_hmac('sha256', $signStr, BUY_SERVER_PKEY); $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; $params['sign'] = $sign;
} }
$url = "https://game2006api-test.kingsome.cn/webapp/index.php?"; $url = "https://game2006api-test.kingsome.cn/webapp/index.php?";
@ -240,7 +240,7 @@ class ToolsController extends BaseController {
($url, ($url,
$params, $params,
$response)) { $response)) {
error_log($response); // error_log($response);
myself()->_rspErr(500, 'server internal error 3, url:' . $url); myself()->_rspErr(500, 'server internal error 3, url:' . $url);
die(); die();
return; return;

View File

@ -36,7 +36,7 @@ class UnitTestController extends BaseAuthedController {
myself()->_callServiceStatic('NoticeService', 'send', $content, $loop, $interval); myself()->_callServiceStatic('NoticeService', 'send', $content, $loop, $interval);
//services\NoticeService::send($content, $loop, $interval); //services\NoticeService::send($content, $loop, $interval);
} catch (Exception $e){ } catch (Exception $e){
error_log($e); error_log('testNotice:' . $e);
} }
} }

View File

@ -804,7 +804,7 @@ class UserController extends BaseAuthedController {
)); ));
return; return;
} }
error_log($response); // error_log($response);
if (empty($response)) { if (empty($response)) {
echo json_encode(array( echo json_encode(array(
'errcode' => 500, 'errcode' => 500,

View File

@ -1164,7 +1164,7 @@ class BattleDataService extends BaseService {
private function randWeight($items) private function randWeight($items)
{ {
error_log(json_encode($items)); // error_log(json_encode($items));
$weights = array(); $weights = array();
{ {
$weight = 0; $weight = 0;

View File

@ -60,7 +60,7 @@ class BigwheelService extends BaseService
'lang_key' => 'Marquee_rewards_get_3', 'lang_key' => 'Marquee_rewards_get_3',
'lang_params' => array(), 'lang_params' => array(),
)); ));
error_log(json_encode($elements)); // error_log(json_encode($elements));
$content = myself()->_callServiceStatic('NoticeService', 'buildCustom', $elements); $content = myself()->_callServiceStatic('NoticeService', 'buildCustom', $elements);
$loop = 1; $loop = 1;
$interval = 1; $interval = 1;

View File

@ -201,7 +201,7 @@ class FormulaService extends BaseService {
$dropRate * ($instanceRankRate + $bossReward*0.2) * $dropRate * ($instanceRankRate + $bossReward*0.2) *
pow(2, $todayPveBattleTimes - $todayPveLastGetFragmentBattle - 1), 1); pow(2, $todayPveBattleTimes - $todayPveLastGetFragmentBattle - 1), 1);
error_log('calcHeroFragmentProbabilityPve:' . $heroProbability . ' dropRate:' . $dropRate); error_log('calcHeroFragmentProbabilityPve:' . $heroProbability . ' dropRate:' . $dropRate);
error_log(json_encode(func_get_args())); // error_log(json_encode(func_get_args()));
return max(0, $heroProbability); return max(0, $heroProbability);
} }
@ -222,7 +222,7 @@ class FormulaService extends BaseService {
$gunProbability = min($gunFragmentNum / $onlineNum * $gunProbability = min($gunFragmentNum / $onlineNum *
$dropRate * ($instanceRankRate + $bossReward*0.2) * $dropRate * ($instanceRankRate + $bossReward*0.2) *
pow(2, $todayPveBattleTimes - $todayPveLastGetFragmentBattle - 1), 1); pow(2, $todayPveBattleTimes - $todayPveLastGetFragmentBattle - 1), 1);
error_log(json_encode(func_get_args())); // error_log(json_encode(func_get_args()));
return max(0, $gunProbability); return max(0, $gunProbability);
} }

View File

@ -537,7 +537,7 @@ class MissionService extends BaseService {
$missionDto['state'] = Mission::RECEIVEABLE_STATE; $missionDto['state'] = Mission::RECEIVEABLE_STATE;
} }
if (!$handled) { if (!$handled) {
error_log(json_encode($missionDto)); // error_log(json_encode($missionDto));
} }
//$missionDto['state'] = Mission::RECEIVEABLE_STATE; //$missionDto['state'] = Mission::RECEIVEABLE_STATE;
return $missionDto; 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->offerRewartdMission['missions'][$idx] = $mission;
$this->saveOfferRewardMission(); $this->saveOfferRewardMission();
$propertyChgService->addHeroChg(); $propertyChgService->addHeroChg();
$propertyChgService->addGunChg(); $propertyChgService->addGunChg();
error_log(json_encode($this->offerRewartdMission)); // error_log(json_encode($this->offerRewartdMission));
myself()->_rspData([ myself()->_rspData([
'property_chg' => $propertyChgService->toDto(), 'property_chg' => $propertyChgService->toDto(),
]); ]);
@ -1169,7 +1169,7 @@ class MissionService extends BaseService {
foreach ($strings as $str){ foreach ($strings as $str){
$strings2 = explode(':', $str); $strings2 = explode(':', $str);
if (count($strings2) < 2) { if (count($strings2) < 2) {
error_log(json_encode($_REQUEST)); // error_log(json_encode($_REQUEST));
continue; continue;
} }
array_push($objects, array_push($objects,
@ -1228,7 +1228,7 @@ class MissionService extends BaseService {
} }
$mission['sendtime'] = 0; $mission['sendtime'] = 0;
$mission['objects'] = array(); $mission['objects'] = array();
error_log(json_encode($mission)); // error_log(json_encode($mission));
} }
} }
$this->saveOfferRewardMission(); $this->saveOfferRewardMission();

View File

@ -74,7 +74,7 @@ class NoticeService extends BaseService {
phpcommon\HttpClient::postContentEx($url, $params, json_encode($data), $response, ['Content-Type: application/json']); phpcommon\HttpClient::postContentEx($url, $params, json_encode($data), $response, ['Content-Type: application/json']);
if (SERVER_ENV != _ONLINE) { if (SERVER_ENV != _ONLINE) {
error_log($response); // error_log($response);
} }
} }
} }