1
This commit is contained in:
parent
089fe16bbc
commit
e3564575d5
@ -393,16 +393,16 @@ class BlockChainController extends BaseAuthedController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($price != $goodsDb['price']) {
|
if ($price != $goodsDb['price']) {
|
||||||
myself()-_rspErr(1, 'price not match, idx:' . $idx);
|
myself()-_rspErr(1, 'price not match, idx:');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$response = services\BlockChainService::gameItemMarketBuy(
|
$rspObj = services\BlockChainService::gameItemMarketBuy(
|
||||||
Transaction::BUY_GOODS_FROM_MARKET_ACTION_TYPE,
|
Transaction::BUY_GOODS_FROM_MARKET_ACTION_TYPE,
|
||||||
$goods['owner_address'],
|
$goods['owner_address'],
|
||||||
$goods['price'],
|
$goods['price'],
|
||||||
$goods['item_id'],
|
$goods['item_id'],
|
||||||
$goods['amount']
|
$goods['item_num']
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!$this->markOrderBuyStatus($idx)) {
|
if (!$this->markOrderBuyStatus($idx)) {
|
||||||
@ -413,7 +413,7 @@ class BlockChainController extends BaseAuthedController {
|
|||||||
$item_id = $goods['item_id'];
|
$item_id = $goods['item_id'];
|
||||||
$item_count = $goods['amount'];
|
$item_count = $goods['amount'];
|
||||||
|
|
||||||
BcOrder::upsert($response['trans_id'], array(
|
BcOrder::upsert($rspObj['trans_id'], array(
|
||||||
'item_id' => $item_id,
|
'item_id' => $item_id,
|
||||||
'item_num' => $item_count,
|
'item_num' => $item_count,
|
||||||
'order_type' => BcOrder::SPEC_ORDER_TYPE,
|
'order_type' => BcOrder::SPEC_ORDER_TYPE,
|
||||||
@ -426,7 +426,8 @@ class BlockChainController extends BaseAuthedController {
|
|||||||
));
|
));
|
||||||
|
|
||||||
$this->_rspData(array(
|
$this->_rspData(array(
|
||||||
'block_chain' => $response,
|
'trans_id' => $rspObj['trans_id'],
|
||||||
|
'params' => $rspObj['params'],
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user