This commit is contained in:
songliang 2023-07-14 16:57:50 +08:00
parent 3a9aed342e
commit 33e607d776
2 changed files with 7 additions and 0 deletions

View File

@ -464,6 +464,7 @@ class Market(object):
_common.ReqHead(),
['account', '', '账号id'],
['idx', '', '出售的idx'],
['s_price', '', '出售价格USDT'],
],
'response': [
_common.RspHead()

View File

@ -687,6 +687,7 @@ class MarketController extends BaseAuthedController
}
$idx = getReqVal('idx', '');
$s_price = getReqVal('s_price', '');
$goods = $this->getGoodsByIdx($idx);
if (!$goods) {
@ -694,6 +695,11 @@ class MarketController extends BaseAuthedController
return;
}
if ($s_price != $goods['s_price']) {
$this->_rspErr(1, 'price not match, idx:' . $idx);
return;
}
$response = services\BlockChainService::gameItemMarketBuy(
Transaction::BUY_GOODS_FROM_MARKET_ACTION_TYPE,
$goods['owner_address'],