diff --git a/webapp/controller/MarketController.class.php b/webapp/controller/MarketController.class.php index 6c758002..1686c240 100644 --- a/webapp/controller/MarketController.class.php +++ b/webapp/controller/MarketController.class.php @@ -187,66 +187,27 @@ class MarketController extends BaseController { $orderId = BuyRecord::genOrderId($gameId, $funcId, myself()->_getNowTime(), $buyerAddress); $tokenId = $orderId; - if ($this->isTestMode()) { - $itemId = $type; - SqlHelper::insert - (myself()->_getMarketMysql(), - 't_box_order', - array( - 'batch_id' => $currBatchMeta['batch_id'], - 'game_id' => $gameId, - 'order_id' => $orderId, - 'type' => $type, - 'item_id' => $itemId, - 'state' => 1, - 'buyer_address' => $buyerAddress, - 'token_id' => $tokenId, - 'price' => $price, - 'payment_token_address' => $paymentTokenAddress, - 'nonce' => $nonce, - 'signature' => $signature, - 'done' => 1, - 'createtime' => myself()->_getNowTime(), - 'modifytime' => myself()->_getNowTime() - ) - ); - SqlHelper::insert - (myself()->_getMarketMysql(), - 't_nft', - array( - 'token_id' => $tokenId, - 'game_id' => $gameId, - 'item_id' => $itemId, - 'owner_id' => $buyerAddress, - 'owner_address' => $buyerAddress, - 'owner_name' => '', - 'createtime' => myself()->_getNowTime(), - 'modifytime' => myself()->_getNowTime() - ) - ); - } else { - $itemId = $type; - SqlHelper::insert - (myself()->_getMarketMysql(), - 't_box_order', - array( - 'batch_id' => $currBatchMeta['batch_id'], - 'order_id' => $orderId, - 'type' => $type, - 'item_id' => $itemId, - 'state' => 0, - 'buyer_address' => $buyerAddress, - 'token_id' => $tokenId, - 'price' => $price, - 'payment_token_address' => $paymentTokenAddress, - 'nonce' => $nonce, - 'signature' => $signature, - 'done' => 0, - 'createtime' => myself()->_getNowTime(), - 'modifytime' => myself()->_getNowTime() - ) - ); - } + $itemId = $type; + SqlHelper::insert( + myself()->_getMarketMysql(), + 't_box_order', + array( + 'batch_id' => $currBatchMeta['batch_id'], + 'order_id' => $orderId, + 'type' => $type, + 'item_id' => $itemId, + 'state' => 0, + 'buyer_address' => $buyerAddress, + 'token_id' => $tokenId, + 'price' => $price, + 'payment_token_address' => $paymentTokenAddress, + 'nonce' => $nonce, + 'signature' => $signature, + 'done' => 0, + 'createtime' => myself()->_getNowTime(), + 'modifytime' => myself()->_getNowTime() + ) + ); myself()->_rspData(array( 'order_id' => $orderId ));