1
This commit is contained in:
parent
0b2b0950a9
commit
2e91f7e53d
@ -99,7 +99,7 @@ class BaseController {
|
||||
'port' => $mysql_conf['port'],
|
||||
'user' => $mysql_conf['user'],
|
||||
'passwd' => $mysql_conf['passwd'],
|
||||
'dbname' => getXVal($mysql_conf, 'marketdb2006')
|
||||
'dbname' => getXVal($mysql_conf, 'dbname', 'marketdb2006')
|
||||
));
|
||||
return $this->marketDbConn;
|
||||
}
|
||||
|
@ -219,18 +219,15 @@ class MarketController extends BaseController {
|
||||
$buyerAddress);
|
||||
$tokenId = $orderId;
|
||||
$tokenType = 0;
|
||||
SqlHelper::insert(
|
||||
myself()->_getMarketMysql(),
|
||||
't_box_order',
|
||||
array(
|
||||
$fieldsKv = array(
|
||||
'game_id' => 2006,
|
||||
'batch_idx' => $currBatchMeta['id'],
|
||||
'order_id' => $orderId,
|
||||
'type' => $type,
|
||||
'item_id' => $itemId,
|
||||
//'item_id' => $itemId,
|
||||
'buyer_address' => $buyerAddress,
|
||||
'token_id' => $tokenId,
|
||||
'token_type' => $tokenType,
|
||||
//'token_id' => $tokenId,
|
||||
//'token_type' => $tokenType,
|
||||
'price' => $price,
|
||||
'payment_token_address' => $paymentTokenAddress,
|
||||
'nonce' => $nonce,
|
||||
@ -238,7 +235,29 @@ class MarketController extends BaseController {
|
||||
'done' => 0,
|
||||
'createtime' => myself()->_getNowTime(),
|
||||
'modifytime' => myself()->_getNowTime()
|
||||
)
|
||||
);
|
||||
{
|
||||
//for test
|
||||
if (MarketService::isTestMode()) {
|
||||
$fieldsKv['bc_paid'] = 1;
|
||||
for ($i = 1; $i <= 3; ++$i) {
|
||||
if ($i <= 3) {
|
||||
$orderId = BuyRecord::genOrderId($gameId,
|
||||
$funcId,
|
||||
myself()->_getNowTime(),
|
||||
$buyerAddress);
|
||||
$fieldsKv['bc_mint_need' . $i] = 1;
|
||||
$fieldsKv['bc_mint_tokenid' . $i] = $orderId;
|
||||
$fieldsKv['bc_mint_itemid' . $i] = $itemId;
|
||||
$fieldsKv['bc_mint_token_type' . $i] = $tokenType;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
SqlHelper::insert(
|
||||
myself()->_getMarketMysql(),
|
||||
't_box_order',
|
||||
$fieldsKv
|
||||
);
|
||||
myself()->_rspData(array(
|
||||
'order_id' => $orderId
|
||||
|
@ -16,6 +16,7 @@ require_once('models/BuyRecord.php');
|
||||
|
||||
require_once('phpcommon/bchelper.php');
|
||||
|
||||
use phpcommon;
|
||||
use phpcommon\SqlHelper;
|
||||
use models\BoxOrder;
|
||||
use models\Nft;
|
||||
|
Loading…
x
Reference in New Issue
Block a user