From 85cc5bfb3224831a2aa4c263bb72950cd389999d Mon Sep 17 00:00:00 2001 From: hujiabin Date: Fri, 28 Oct 2022 15:49:41 +0800 Subject: [PATCH] 1 --- webapp/controller/UserController.class.php | 27 ++++------------------ 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/webapp/controller/UserController.class.php b/webapp/controller/UserController.class.php index 3cd5e7c4..fbe2f2d9 100644 --- a/webapp/controller/UserController.class.php +++ b/webapp/controller/UserController.class.php @@ -101,9 +101,6 @@ class UserController extends BaseAuthedController { $this->_addItems($items,$awardService,$propertyChgService); } - public function test(){ - $this->addChip(); - } private function addChip(){ $itemMeta = \mt\Item::getMetaListByType(\mt\Item::CHIP_TYPE); $list1 = []; @@ -371,29 +368,13 @@ class UserController extends BaseAuthedController { 'token_id'=>$hero_token_id )); -// $gun_token_id = Nft::addNft(\mt\Item::get($gunDb['gun_id'])); -// Gun::update($gunDb['idx'],array( -// 'token_id'=>$gun_token_id -// )); - $gun_token_id = myself()->_getNowTime()+2; - $tokenType = Nft::getTokenType(\mt\Item::get($gunDb['gun_id'])); - SqlHelper::insert( - myself()->_getMarketMysql(), - 't_nft', - array( - 'token_id' => $gun_token_id, - 'token_type' => $tokenType, - 'game_id' => 2006, - 'item_id' => \mt\Item::get($gunDb['gun_id'])['id'], - 'owner_address' => myself()->_getOpenId(), - 'createtime' => myself()->_getNowTime(), - 'modifytime' => myself()->_getNowTime(), - ) - ); + $gun_token_id = Nft::addNft(\mt\Item::get($gunDb['gun_id'])); + Gun::update($gunDb['idx'],array( + 'token_id'=>$gun_token_id + )); Gun::update($gunDb['idx'],array( 'token_id'=>$gun_token_id )); - $propertyChgService = new services\PropertyChgService(); $propertyChgService->addUserChg(); $propertyChgService->addHeroChg();