diff --git a/webapp/controller/BagController.class.php b/webapp/controller/BagController.class.php index 9b525a74..ed3f1a80 100644 --- a/webapp/controller/BagController.class.php +++ b/webapp/controller/BagController.class.php @@ -334,21 +334,22 @@ class BagController extends BaseAuthedController { } private function openFragmentBox($itemDb, $itemMeta, $itemNum){ - if ($itemDb['item_num']<$itemNum){ - $this->_rspErr(1, "The shard chest is insufficient"); - return; - } - for ($i=1;$i<=$itemNum;$i++){ - if (! Nft::addNftByFragmentBox($itemMeta,$i)){ - $this->_rspErr(1, "server internal error"); - return; - } - Bag::decItemByUnIid($itemDb['item_uniid'], 1); - } - $this->propertyChgService->addBagChg(); - $this->_rspData(array( - 'property_chg' => $this->propertyChgService->toDto(), - )); + $this->_rspOk(); +// if ($itemDb['item_num']<$itemNum){ +// $this->_rspErr(1, "The shard chest is insufficient"); +// return; +// } +// for ($i=1;$i<=$itemNum;$i++){ +// if (! Nft::addNftByFragmentBox($itemMeta,$i)){ +// $this->_rspErr(1, "server internal error"); +// return; +// } +// Bag::decItemByUnIid($itemDb['item_uniid'], 1); +// } +// $this->propertyChgService->addBagChg(); +// $this->_rspData(array( +// 'property_chg' => $this->propertyChgService->toDto(), +// )); } } diff --git a/webapp/controller/BaseAuthedController.class.php b/webapp/controller/BaseAuthedController.class.php index bebb435e..b8f4ec8e 100644 --- a/webapp/controller/BaseAuthedController.class.php +++ b/webapp/controller/BaseAuthedController.class.php @@ -349,25 +349,25 @@ class BaseAuthedController extends BaseController { break; case mt\Item::RING_TYPE: { -// Nft::addNft($itemMeta); - $currentSeason = mt\RankSeason::getCurrentSeason(); - if ($currentSeason){ - SqlHelper::insert( - myself()->_getMarketMysql(), - 't_nft', - array( - 'token_id' => Nft::genTempTokenId(), - 'token_type' => Nft::getTokenType($itemMeta), - 'game_id' => 2006, - 'item_id' => $itemMeta['id'], - 'param1' => $currentSeason['id']-1, - 'owner_address' => myself()->_getOpenId(), - 'createtime' => myself()->_getNowTime(), - 'modifytime' => myself()->_getNowTime(), - ) - ); - $propertyService->addUserChg(); - } + $this->_rspOk();return; +// $currentSeason = mt\RankSeason::getCurrentSeason(); +// if ($currentSeason){ +// SqlHelper::insert( +// myself()->_getMarketMysql(), +// 't_nft', +// array( +// 'token_id' => Nft::genTempTokenId(), +// 'token_type' => Nft::getTokenType($itemMeta), +// 'game_id' => 2006, +// 'item_id' => $itemMeta['id'], +// 'param1' => $currentSeason['id']-1, +// 'owner_address' => myself()->_getOpenId(), +// 'createtime' => myself()->_getNowTime(), +// 'modifytime' => myself()->_getNowTime(), +// ) +// ); +// $propertyService->addUserChg(); +// } } break; case mt\Item::PARACHUTE_TYPE: diff --git a/webapp/controller/ChipController.class.php b/webapp/controller/ChipController.class.php index a25d8891..9951aa7c 100644 --- a/webapp/controller/ChipController.class.php +++ b/webapp/controller/ChipController.class.php @@ -329,6 +329,7 @@ class ChipController extends BaseAuthedController } public function syntheticChip(){ + $this->_rspOk();return; $token_id_main = trim(getReqVal('token_id_main', 0)); $token_id_param = array_filter(explode(' ',getReqVal('token_id_param', 0))); if (! $token_id_main || count($token_id_param)<=0 ) { @@ -350,7 +351,7 @@ class ChipController extends BaseAuthedController 'token_id'=>$chip_param['token_id'], )); $cumulative_cost += \services\FormulaService::getChipCumulativeCost($chip_param['chip_grade']); - Chip::deleteChip(['token_id'=>$val]); +// Chip::deleteChip(['token_id'=>$val]); } { //埋点 diff --git a/webapp/controller/FragmentController.class.php b/webapp/controller/FragmentController.class.php index ae79c7b2..dda6dde7 100644 --- a/webapp/controller/FragmentController.class.php +++ b/webapp/controller/FragmentController.class.php @@ -91,6 +91,8 @@ class FragmentController extends BaseAuthedController } public function syntheticFragment(){ + $this->_rspOk();return; + $type = getReqVal('type', 0); $unique_ids = getReqVal('unique_ids',''); $unique_id_special = getReqVal('unique_id_special',''); @@ -151,7 +153,7 @@ class FragmentController extends BaseAuthedController 'unique_id'=>null, 'token_id'=>$val, )); - Fragment::deleteFragment(['token_id'=>$val]); +// Fragment::deleteFragment(['token_id'=>$val]); } { //埋点 @@ -163,7 +165,7 @@ class FragmentController extends BaseAuthedController } // $this->_decItems($costItems); //生成NFT英雄 - $tokenid = Nft::addNft($itemMeta); +// $tokenid = Nft::addNft($itemMeta); { //埋点 $nftDb = Nft::getNft($tokenid); @@ -214,7 +216,7 @@ class FragmentController extends BaseAuthedController 'unique_id'=>null, 'token_id'=>$val, )); - Fragment::deleteFragment(['token_id'=>$val]); +// Fragment::deleteFragment(['token_id'=>$val]); } { //埋点 @@ -229,7 +231,7 @@ class FragmentController extends BaseAuthedController $key = rand(0,count($itemMetaList)-1); $itemMeta = $itemMetaList[$key]; //生成NFT英雄 - $tokenid = Nft::addNft($itemMeta); +// $tokenid = Nft::addNft($itemMeta); { //埋点 $nftDb = Nft::getNft($tokenid); @@ -300,7 +302,7 @@ class FragmentController extends BaseAuthedController 'unique_id'=>null, 'token_id'=>$val, )); - Fragment::deleteFragment(['token_id'=>$val]); +// Fragment::deleteFragment(['token_id'=>$val]); } { //埋点 @@ -312,7 +314,7 @@ class FragmentController extends BaseAuthedController } // $this->_decItems($costItems); //生成NFT英雄 - $tokenid = Nft::addNft($itemMeta); +// $tokenid = Nft::addNft($itemMeta); { //埋点 $nftDb = Nft::getNft($tokenid); @@ -364,7 +366,7 @@ class FragmentController extends BaseAuthedController 'unique_id'=>null, 'token_id'=>$val, )); - Fragment::deleteFragment(['token_id'=>$val]); +// Fragment::deleteFragment(['token_id'=>$val]); } { //埋点 @@ -379,7 +381,7 @@ class FragmentController extends BaseAuthedController $key = rand(0,count($itemMetaList)-1); $itemMeta = $itemMetaList[$key]; //生成NFT英雄 - $tokenid = Nft::addNft($itemMeta); +// $tokenid = Nft::addNft($itemMeta); { //埋点 $nftDb = Nft::getNft($tokenid); diff --git a/webapp/controller/GMController.class.php b/webapp/controller/GMController.class.php index f1706182..3ccdb53e 100644 --- a/webapp/controller/GMController.class.php +++ b/webapp/controller/GMController.class.php @@ -35,9 +35,9 @@ class GMController extends BaseAuthedController { '.additem' => function () use($params) { $this->addItem($params); }, - '.addnft' => function () use($params) { - $this->addNft($params); - }, +// '.addnft' => function () use($params) { +// $this->addNft($params); +// }, '.addtili' => function () use($params) { $this->addTili($params); }, @@ -69,7 +69,6 @@ class GMController extends BaseAuthedController { .getsystime //获取服务器时间 .setsystime //设置服务器时间,示例:.setsystime 2021-12-08 00:00:00 .reset_mission //重置任务 -.addnft 道具id //添加nft END )); } @@ -93,44 +92,44 @@ END )); } - private function addNft($params) - { - $itemId = getXVal($params, 0, 0); - $propertyChgService = new services\PropertyChgService(); - $awardService = new services\AwardService(); - - $itemMeta = mt\Item::get($itemId); - if ($itemMeta) { - $tokenType = Nft::getTokenType($itemMeta); - if ($tokenType == Nft::NONE_TYPE) { - myself()->_rspErr(1, 'param item_id error'); - return; - } else { - SqlHelper::insert( - myself()->_getMarketMysql(), - 't_nft', - array( - 'token_id' => Nft::genTempTokenId(), - 'token_type' => $tokenType, - 'game_id' => 2006, - 'item_id' => $itemId, - 'owner_address' => myself()->_getOpenId(), - 'createtime' => myself()->_getNowTime(), - 'modifytime' => myself()->_getNowTime(), - ) - ); - } - } else { - myself()->_rspErr(1, 'param item_id error'); - return; - } - - $this->_rspData(array( - 'text' => 'add nft success', - 'award' => $awardService->toDto(), - 'property_chg' => $propertyChgService->toDto(), - )); - } +// private function addNft($params) +// { +// $itemId = getXVal($params, 0, 0); +// $propertyChgService = new services\PropertyChgService(); +// $awardService = new services\AwardService(); +// +// $itemMeta = mt\Item::get($itemId); +// if ($itemMeta) { +// $tokenType = Nft::getTokenType($itemMeta); +// if ($tokenType == Nft::NONE_TYPE) { +// myself()->_rspErr(1, 'param item_id error'); +// return; +// } else { +// SqlHelper::insert( +// myself()->_getMarketMysql(), +// 't_nft', +// array( +// 'token_id' => Nft::genTempTokenId(), +// 'token_type' => $tokenType, +// 'game_id' => 2006, +// 'item_id' => $itemId, +// 'owner_address' => myself()->_getOpenId(), +// 'createtime' => myself()->_getNowTime(), +// 'modifytime' => myself()->_getNowTime(), +// ) +// ); +// } +// } else { +// myself()->_rspErr(1, 'param item_id error'); +// return; +// } +// +// $this->_rspData(array( +// 'text' => 'add nft success', +// 'award' => $awardService->toDto(), +// 'property_chg' => $propertyChgService->toDto(), +// )); +// } private function addTili($params) { diff --git a/webapp/controller/GunController.class.php b/webapp/controller/GunController.class.php index 9b7fc9e2..558ef3a1 100644 --- a/webapp/controller/GunController.class.php +++ b/webapp/controller/GunController.class.php @@ -461,6 +461,7 @@ class GunController extends BaseAuthedController { } public function receive(){ + $this->_rspOk();return; $type = getReqVal('type', 0); $gunUniId = getReqVal('gun_uniid', 0); $gunDb = Gun::find($gunUniId); @@ -561,12 +562,12 @@ class GunController extends BaseAuthedController { $costGunDb = Gun::find($costGunUniId); if ($costGunDb['token_id']){ - SqlHelper::update( - myself()->_getMarketMysql(), - 't_nft', - ['token_id'=>$costGunDb['token_id']], - ['deleted'=>1] - ); +// SqlHelper::update( +// myself()->_getMarketMysql(), +// 't_nft', +// ['token_id'=>$costGunDb['token_id']], +// ['deleted'=>1] +// ); }else{ Gun::update($costGunUniId, array( diff --git a/webapp/controller/HeroController.class.php b/webapp/controller/HeroController.class.php index 2e18390c..521d2fa5 100644 --- a/webapp/controller/HeroController.class.php +++ b/webapp/controller/HeroController.class.php @@ -228,6 +228,7 @@ class HeroController extends BaseAuthedController { public function receive() { + $this->_rspOk();return; $type = getReqVal('type', 0); $heroUniId = getReqVal('hero_uniid', 0); $heroDb = Hero::find($heroUniId); @@ -346,12 +347,12 @@ class HeroController extends BaseAuthedController { if ($nextQualityMeta) { $costHeroDb = Hero::find($costHeroUniId); if ($costHeroDb['token_id']){ - SqlHelper::update( - myself()->_getMarketMysql(), - 't_nft', - ['token_id'=>$costHeroDb['token_id']], - ['deleted'=>1] - ); +// SqlHelper::update( +// myself()->_getMarketMysql(), +// 't_nft', +// ['token_id'=>$costHeroDb['token_id']], +// ['deleted'=>1] +// ); }else{ Hero::update($costHeroUniId, array( diff --git a/webapp/controller/UserController.class.php b/webapp/controller/UserController.class.php index db5673db..f4c54f48 100644 --- a/webapp/controller/UserController.class.php +++ b/webapp/controller/UserController.class.php @@ -60,9 +60,9 @@ class UserController extends BaseAuthedController { //测试服 if (!$userInfo) { $this->createNewUserV2($userName); - $this->_addFreeItem(); //测试需要,上线要删除 - $this->addFragmentBox(); //测试需要,上线要删除 - $this->addChip(); //测试需要,上线要删除 +// $this->_addFreeItem(); //测试需要,上线要删除 +// $this->addFragmentBox(); //测试需要,上线要删除 +// $this->addChip(); //测试需要,上线要删除 $userInfo = $this->_getOrmUserInfo(); $this->_setV(TN_RANK_STATUS, 0, 1); } @@ -329,7 +329,7 @@ class UserController extends BaseAuthedController { public function active() { - + $this->_rspOk();return; $hero_uniid = getReqVal('hero_uniid', 0); $gun_uniid = getReqVal('gun_uniid', 0); diff --git a/webapp/models/Chip.php b/webapp/models/Chip.php index e58fe8f4..a0f913f2 100644 --- a/webapp/models/Chip.php +++ b/webapp/models/Chip.php @@ -49,19 +49,19 @@ class Chip extends BaseModel 'token_id' => $nftDb['token_id'], ) ); - if (!$row) { - $itemMeta = mt\Item::get($nftDb['item_id']); - if ($itemMeta) { - self::addChip($nftDb['item_id'], $nftDb['token_id']); - $row = SqlHelper::ormSelectOne( - myself()->_getSelfMysql(), - 't_chip', - array( - 'token_id' => $nftDb['token_id'], - ) - ); - } - } +// if (!$row) { +// $itemMeta = mt\Item::get($nftDb['item_id']); +// if ($itemMeta) { +// self::addChip($nftDb['item_id'], $nftDb['token_id']); +// $row = SqlHelper::ormSelectOne( +// myself()->_getSelfMysql(), +// 't_chip', +// array( +// 'token_id' => $nftDb['token_id'], +// ) +// ); +// } +// } if ($row) { $cb($row); } @@ -239,14 +239,14 @@ class Chip extends BaseModel ); } - public static function deleteChip($whereKv){ - SqlHelper::update( - myself()->_getMarketMysql(), - 't_nft', - $whereKv, - ['deleted'=>1] - ); - } +// public static function deleteChip($whereKv){ +// SqlHelper::update( +// myself()->_getMarketMysql(), +// 't_nft', +// $whereKv, +// ['deleted'=>1] +// ); +// } public static function updateRandAttr($chip){ $attr_pool = mt\ChipAttr::generateOneAttr($chip['chip_type']); diff --git a/webapp/models/Fragment.php b/webapp/models/Fragment.php index 8d0f8a7b..bda21753 100644 --- a/webapp/models/Fragment.php +++ b/webapp/models/Fragment.php @@ -23,7 +23,6 @@ class Fragment extends BaseModel 'deleted' => 0 ) ); -// print_r($nft);die; foreach ($nft as $nftDb) { $row = SqlHelper::ormSelectOne( myself()->_getSelfMysql(), @@ -32,19 +31,19 @@ class Fragment extends BaseModel 'token_id' => $nftDb['token_id'], ) ); - if (!$row) { - $itemMeta = mt\Item::get($nftDb['item_id']); - if ($itemMeta) { - self::addFragment($itemMeta, $nftDb['token_id']); - $row = SqlHelper::ormSelectOne( - myself()->_getSelfMysql(), - 't_fragment', - array( - 'token_id' => $nftDb['token_id'], - ) - ); - } - } +// if (!$row) { +// $itemMeta = mt\Item::get($nftDb['item_id']); +// if ($itemMeta) { +// self::addFragment($itemMeta, $nftDb['token_id']); +// $row = SqlHelper::ormSelectOne( +// myself()->_getSelfMysql(), +// 't_fragment', +// array( +// 'token_id' => $nftDb['token_id'], +// ) +// ); +// } +// } if ($row) { $cb($row); } @@ -95,14 +94,14 @@ class Fragment extends BaseModel } - public static function deleteFragment($whereKv){ - SqlHelper::update( - myself()->_getMarketMysql(), - 't_nft', - $whereKv, - ['deleted'=>1] - ); - } +// public static function deleteFragment($whereKv){ +// SqlHelper::update( +// myself()->_getMarketMysql(), +// 't_nft', +// $whereKv, +// ['deleted'=>1] +// ); +// } } \ No newline at end of file diff --git a/webapp/models/Gun.php b/webapp/models/Gun.php index bab801ac..955940fb 100644 --- a/webapp/models/Gun.php +++ b/webapp/models/Gun.php @@ -115,20 +115,20 @@ class Gun extends BaseModel { 'token_id' => $nftDb['token_id'], ) ); - if (!$row) { - $itemMeta = mt\Item::get($nftDb['item_id']); - if ($itemMeta) { - self::addNftGun($itemMeta, $nftDb['token_id']); - $row = SqlHelper::ormSelectOne( - myself()->_getSelfMysql(), - 't_gun', - array( - 'token_id' => $nftDb['token_id'], - ) - ); - } - - } +// if (!$row) { +// $itemMeta = mt\Item::get($nftDb['item_id']); +// if ($itemMeta) { +// self::addNftGun($itemMeta, $nftDb['token_id']); +// $row = SqlHelper::ormSelectOne( +// myself()->_getSelfMysql(), +// 't_gun', +// array( +// 'token_id' => $nftDb['token_id'], +// ) +// ); +// } +// +// } if ($row) { $cb($row); } diff --git a/webapp/models/Hero.php b/webapp/models/Hero.php index 15fff158..e66a6212 100644 --- a/webapp/models/Hero.php +++ b/webapp/models/Hero.php @@ -85,7 +85,7 @@ class Hero extends BaseModel { }); return $cegUpLimit; } -//james + public static function getHeroList($cb) { SqlHelper::ormSelect( @@ -107,21 +107,21 @@ class Hero extends BaseModel { 'token_id' => $nftDb['token_id'], ) ); - if (!$row) { - $itemMeta = mt\Item::get($nftDb['item_id']); - if ($itemMeta) { - self::addNftHero($itemMeta, $nftDb['token_id']); - $row = SqlHelper::ormSelectOne( - myself()->_getSelfMysql(), - 't_hero', - array( - 'token_id' => $nftDb['token_id'], - ) - ); - User::upsertHeadList($itemMeta); - } - - } +// if (!$row) { +// $itemMeta = mt\Item::get($nftDb['item_id']); +// if ($itemMeta) { +// self::addNftHero($itemMeta, $nftDb['token_id']); +// $row = SqlHelper::ormSelectOne( +// myself()->_getSelfMysql(), +// 't_hero', +// array( +// 'token_id' => $nftDb['token_id'], +// ) +// ); +// User::upsertHeadList($itemMeta); +// } +// +// } if ($row) { $cb($row); } diff --git a/webapp/models/Nft.php b/webapp/models/Nft.php index e9b7dd34..713fdfc0 100644 --- a/webapp/models/Nft.php +++ b/webapp/models/Nft.php @@ -189,16 +189,16 @@ class Nft extends BaseModel { if ($initQualityMeta) { $randAttr = mt\GunQuality::getRandAttr($initQualityMeta); } - SqlHelper::update( - myself()->_getMarketMysql(), - 't_nft', - array( - 'token_id' => $nft['token_id'] - ), - array( - 'rand_attr' => json_encode($randAttr) - ) - ); +// SqlHelper::update( +// myself()->_getMarketMysql(), +// 't_nft', +// array( +// 'token_id' => $nft['token_id'] +// ), +// array( +// 'rand_attr' => json_encode($randAttr) +// ) +// ); } { foreach($randAttr as &$attr) { @@ -250,59 +250,59 @@ class Nft extends BaseModel { } } - public static function addNftByFragmentBox($itemMeta,$num=0){ - if ($itemMeta) { - $tokenType = Nft::getTokenType($itemMeta); - if ($tokenType == Nft::NONE_TYPE) { - return false; - } else { - SqlHelper::insert( - myself()->_getMarketMysql(), - 't_nft', - array( - 'token_id' => self::genTempTokenId(), - 'token_type' => $tokenType, - 'game_id' => 2006, - 'item_id' => $itemMeta['include_item_id'], - 'owner_address' => myself()->_getOpenId(), - 'createtime' => myself()->_getNowTime(), - 'modifytime' => myself()->_getNowTime(), - ) - ); - return true; - } - } else { - return false; - } - } +// public static function addNftByFragmentBox($itemMeta,$num=0){ +// if ($itemMeta) { +// $tokenType = Nft::getTokenType($itemMeta); +// if ($tokenType == Nft::NONE_TYPE) { +// return false; +// } else { +// SqlHelper::insert( +// myself()->_getMarketMysql(), +// 't_nft', +// array( +// 'token_id' => self::genTempTokenId(), +// 'token_type' => $tokenType, +// 'game_id' => 2006, +// 'item_id' => $itemMeta['include_item_id'], +// 'owner_address' => myself()->_getOpenId(), +// 'createtime' => myself()->_getNowTime(), +// 'modifytime' => myself()->_getNowTime(), +// ) +// ); +// return true; +// } +// } else { +// return false; +// } +// } - public static function addNft($itemMeta){ - if ($itemMeta) { - $tokenID = self::genTempTokenId(); - $tokenType = Nft::getTokenType($itemMeta); - - if ($tokenType == Nft::NONE_TYPE) { - return false; - } else { - SqlHelper::insert( - myself()->_getMarketMysql(), - 't_nft', - array( - 'token_id' => $tokenID, - 'token_type' => $tokenType, - 'game_id' => 2006, - 'item_id' => $itemMeta['id'], - 'owner_address' => myself()->_getOpenId(), - 'createtime' => myself()->_getNowTime(), - 'modifytime' => myself()->_getNowTime(), - ) - ); - return $tokenID; - } - } else { - return false; - } - } +// public static function addNft($itemMeta){ +// if ($itemMeta) { +// $tokenID = self::genTempTokenId(); +// $tokenType = Nft::getTokenType($itemMeta); +// +// if ($tokenType == Nft::NONE_TYPE) { +// return false; +// } else { +// SqlHelper::insert( +// myself()->_getMarketMysql(), +// 't_nft', +// array( +// 'token_id' => $tokenID, +// 'token_type' => $tokenType, +// 'game_id' => 2006, +// 'item_id' => $itemMeta['id'], +// 'owner_address' => myself()->_getOpenId(), +// 'createtime' => myself()->_getNowTime(), +// 'modifytime' => myself()->_getNowTime(), +// ) +// ); +// return $tokenID; +// } +// } else { +// return false; +// } +// } private static function parseTags($tagsStr) { diff --git a/webapp/models/UserSeasonRing.php b/webapp/models/UserSeasonRing.php index f5bf6faf..744df3a4 100644 --- a/webapp/models/UserSeasonRing.php +++ b/webapp/models/UserSeasonRing.php @@ -37,8 +37,6 @@ class UserSeasonRing extends BaseModel $cb($row); } ); -// print_r(NftService::getRing(phpcommon\extractOpenId($targetId)));die; - foreach (NftService::getRing(phpcommon\extractOpenId($targetId)) as $nftDb) { if (! $nftDb['deleted']){ $row = SqlHelper::ormSelectOne( @@ -48,22 +46,22 @@ class UserSeasonRing extends BaseModel 'token_id' => $nftDb['token_id'], ) ); - if (!$row) { - $itemMeta = mt\Item::get($nftDb['item_id']); - if ($itemMeta) { - self::addNftRing($itemMeta, $nftDb['token_id'],$targetId,$nftDb['param1']); - $row = SqlHelper::ormSelectOne( - myself()->_getSelfMysql(), - 't_user_season_ring', - array( - 'token_id' => $nftDb['token_id'], - ) - ); - } - if ($row) { - $cb($row); - } - } +// if (!$row) { +// $itemMeta = mt\Item::get($nftDb['item_id']); +// if ($itemMeta) { +// self::addNftRing($itemMeta, $nftDb['token_id'],$targetId,$nftDb['param1']); +// $row = SqlHelper::ormSelectOne( +// myself()->_getSelfMysql(), +// 't_user_season_ring', +// array( +// 'token_id' => $nftDb['token_id'], +// ) +// ); +// } +// if ($row) { +// $cb($row); +// } +// } } } diff --git a/webapp/services/NftService.php b/webapp/services/NftService.php index 56abd22c..223e4b01 100644 --- a/webapp/services/NftService.php +++ b/webapp/services/NftService.php @@ -85,33 +85,33 @@ class NftService extends BaseService { } } - public static function addNft($itemId,$token_id){ - $itemMeta = Item::get($itemId); - if ($itemMeta) { - $tokenType = Nft::getTokenType($itemMeta); - if ($tokenType == Nft::NONE_TYPE) { - myself()->_rspErr(1, 'param item_id error'); - return false; - } else { - SqlHelper::insert( - myself()->_getMarketMysql(), - 't_nft', - array( - 'token_id' => $token_id, - 'token_type' => $tokenType, - 'game_id' => 2006, - 'item_id' => $itemId, - 'owner_address' => myself()->_getOpenId(), - 'createtime' => myself()->_getNowTime(), - 'modifytime' => myself()->_getNowTime(), - ) - ); - return true; - } - } else { - myself()->_rspErr(1, 'param item_id error'); - return false; - } - } +// public static function addNft($itemId,$token_id){ +// $itemMeta = Item::get($itemId); +// if ($itemMeta) { +// $tokenType = Nft::getTokenType($itemMeta); +// if ($tokenType == Nft::NONE_TYPE) { +// myself()->_rspErr(1, 'param item_id error'); +// return false; +// } else { +// SqlHelper::insert( +// myself()->_getMarketMysql(), +// 't_nft', +// array( +// 'token_id' => $token_id, +// 'token_type' => $tokenType, +// 'game_id' => 2006, +// 'item_id' => $itemId, +// 'owner_address' => myself()->_getOpenId(), +// 'createtime' => myself()->_getNowTime(), +// 'modifytime' => myself()->_getNowTime(), +// ) +// ); +// return true; +// } +// } else { +// myself()->_rspErr(1, 'param item_id error'); +// return false; +// } +// } }