diff --git a/webapp/models/Transaction.php b/webapp/models/Transaction.php index 2e5bdc59..07e2c3be 100644 --- a/webapp/models/Transaction.php +++ b/webapp/models/Transaction.php @@ -92,6 +92,29 @@ class Transaction extends BaseModel { ); } + public static function addEx($address,$transId, $action, $tokenId, $tokenType, $itemUniId, $itemId, $itemNum, $result) + { + SqlHelper::insert( + myself()->_getMysql(''), + 't_transaction', + array( + 'account_id' => '', + 'address' => $address, + 'trans_id' => $transId, + 'action' => $action, + 'token_id' => $tokenId, + 'token_type' => $tokenType, + 'item_uniid' => $itemUniId, + 'item_id' => $itemId, + 'item_num' => $itemNum, + 'result' => $result, + 'status' => self::CREATED_STATUS, + 'createtime' => myself()->_getNowTime(), + 'modifytime' => myself()->_getNowTime(), + ) + ); + } + public static function getActionDesc($transDb) { switch ($transDb['action']) { diff --git a/webapp/services/BlockChainService.php b/webapp/services/BlockChainService.php index 57c518c9..cb041351 100644 --- a/webapp/services/BlockChainService.php +++ b/webapp/services/BlockChainService.php @@ -206,7 +206,8 @@ class BlockChainService { $rspObj = json_decode($response, true); if ($rspObj['errcode'] == 0) { $transId = $rspObj['trans_id']; - Transaction::add( + Transaction::addEx( + $address, $transId, $actionType, '', //$tokenId,