diff --git a/webapp/controller/BlockChainController.class.php b/webapp/controller/BlockChainController.class.php index 778b2071..f6470ba1 100644 --- a/webapp/controller/BlockChainController.class.php +++ b/webapp/controller/BlockChainController.class.php @@ -254,6 +254,7 @@ class BlockChainController extends BaseAuthedController { $tokenType, $itemUniId, $itemId, + 1, 1 ); myself()->_rspData(array( diff --git a/webapp/models/Transaction.php b/webapp/models/Transaction.php index c13b1b14..357a2349 100644 --- a/webapp/models/Transaction.php +++ b/webapp/models/Transaction.php @@ -65,7 +65,7 @@ class Transaction extends BaseModel { return $row; } - public static function add($transId, $action, $tokenId, $tokenType, $itemUniId, $itemId, $result) + public static function add($transId, $action, $tokenId, $tokenType, $itemUniId, $itemId, $itemNum, $result) { SqlHelper::insert( myself()->_getSelfMysql(), @@ -79,6 +79,7 @@ class Transaction extends BaseModel { 'token_type' => $tokenType, 'item_uniid' => $itemUniId, 'item_id' => $itemId, + 'item_num' => $itemNum, 'result' => $result, 'status' => self::CREATED_STATUS, 'createtime' => myself()->_getNowTime(), diff --git a/webapp/services/BlockChainService.php b/webapp/services/BlockChainService.php index ed586e12..915c23cf 100644 --- a/webapp/services/BlockChainService.php +++ b/webapp/services/BlockChainService.php @@ -13,6 +13,7 @@ class BlockChainService { die(); return; } + $account = myself()->_getAddress(); $params = array( 'c' => 'GameItemMall', 'a' => 'buy', @@ -40,7 +41,8 @@ class BlockChainService { '', //$tokenId, '', //$tokenType, 0, //$itemUniId, - 0, //$itemId, + $itemId, //$itemId, + $itemNum, 1 ); return array(