From 7280473f9e112c8103c44f055b112e88f7aeafb3 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Wed, 9 Nov 2022 00:12:51 +0800 Subject: [PATCH] 1 --- webapp/controller/BlockChainController.class.php | 13 +++++++------ webapp/models/Gun.php | 3 +++ webapp/models/Transaction.php | 4 ++-- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/webapp/controller/BlockChainController.class.php b/webapp/controller/BlockChainController.class.php index a97af43c..49bf3bd0 100644 --- a/webapp/controller/BlockChainController.class.php +++ b/webapp/controller/BlockChainController.class.php @@ -412,6 +412,7 @@ class BlockChainController extends BaseAuthedController { $chipIds = explode('|', getReqVal('chip_ids', '')); $slotIds = explode('|', getReqVal('slot_ids', '')); + error_log(json_encode($_REQUEST)); if (count($chipIds) != count($slotIds) || count($chipIds) < 0) { myself()->_rspErr(101, 'chip_ids paramater error'); @@ -450,7 +451,7 @@ class BlockChainController extends BaseAuthedController { 'action' => Transaction::PLUGIN_CHIP_ACTION_TYPE, 'tokenId' => $tokenId, 'tokenType' => Nft::HERO_TYPE, - 'itemUniId' => $heroDb['chip_uniid'], + 'itemUniId' => $heroDb['hero_uniid'], 'itemId' => $heroDb['item_id'] ) ); @@ -488,8 +489,8 @@ class BlockChainController extends BaseAuthedController { 'action' => Transaction::PLUGIN_CHIP_ACTION_TYPE, 'tokenId' => $tokenId, 'tokenType' => Nft::EQUIP_TYPE, - 'itemUniId' => $gunDb['chip_uniid'], - 'itemId' => $gunDb['item_id'] + 'itemUniId' => $gunDb['gun_uniid'], + 'itemId' => $gunDb['gun_id'] ) ); } @@ -546,7 +547,7 @@ class BlockChainController extends BaseAuthedController { 'action' => Transaction::UNPLUG_CHIP_ACTION_TYPE, 'tokenId' => $tokenId, 'tokenType' => Nft::HERO_TYPE, - 'itemUniId' => $heroDb['chip_uniid'], + 'itemUniId' => $heroDb['hero_uniid'], 'itemId' => $heroDb['item_id'] ) ); @@ -584,8 +585,8 @@ class BlockChainController extends BaseAuthedController { 'action' => Transaction::UNPLUG_CHIP_ACTION_TYPE, 'tokenId' => $tokenId, 'tokenType' => Nft::EQUIP_TYPE, - 'itemUniId' => $gunDb['chip_uniid'], - 'itemId' => $gunDb['item_id'] + 'itemUniId' => $gunDb['gun_uniid'], + 'itemId' => $gunDb['gun_id'] ) ); } diff --git a/webapp/models/Gun.php b/webapp/models/Gun.php index ba0d80a1..91b69ad1 100644 --- a/webapp/models/Gun.php +++ b/webapp/models/Gun.php @@ -261,6 +261,9 @@ class Gun extends BaseModel { $dto['pvp_ceg_uplimit'] = strval( round(FormulaService::getWeaponPvpDailyCegUpLimit($dto),2) ); $dto['pve_ceg_uplimit'] = strval( round(FormulaService::getWeaponPveDailyCegUpLimit($dto),2) ); $dto['mission_ceg_uplimit'] = strval( round(FormulaService::getWeaponMissionDailyCegUpLimit($dto),2) ); + error_log(json_encode(array( + 'data____info'=>$dto + ))) ; return $dto; } diff --git a/webapp/models/Transaction.php b/webapp/models/Transaction.php index f343744d..df598f8f 100644 --- a/webapp/models/Transaction.php +++ b/webapp/models/Transaction.php @@ -117,12 +117,12 @@ class Transaction extends BaseModel { case self::CREATED_STATUS: case self::REPORTED_STATUS: { - return 'Pending'; + return 2; } break; case self::COMPLETED_STATUS: { - return 'Complete'; + return 1; } break; default: