From 093a16442ab8509b90d7db1743f71e8c5d0b1b48 Mon Sep 17 00:00:00 2001 From: songliang Date: Fri, 7 Jul 2023 20:52:33 +0800 Subject: [PATCH] ... --- webapp/controller/MarketController.class.php | 5 +++-- webapp/services/BlockChainService.php | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/webapp/controller/MarketController.class.php b/webapp/controller/MarketController.class.php index 0a733544..47890863 100644 --- a/webapp/controller/MarketController.class.php +++ b/webapp/controller/MarketController.class.php @@ -1174,9 +1174,10 @@ class MarketController extends BaseAuthedController $this->_rspErr(1, 'goods not found, idx:' . $idx); return; } - - $response = services\BlockChainService::gameItemMallBuy( + + $response = services\BlockChainService::gameItemMarketBuy( Transaction::BUY_GOODS_FROM_MARKET_ACTION_TYPE, + $goods['owner_address'], $goods['s_price'], $goods['item_id'], $goods['amount'] diff --git a/webapp/services/BlockChainService.php b/webapp/services/BlockChainService.php index 8d712dc7..9dafdbd7 100644 --- a/webapp/services/BlockChainService.php +++ b/webapp/services/BlockChainService.php @@ -97,7 +97,7 @@ class BlockChainService { c */ - public static function gameItemMarketBuy($actionType, $price, $itemId, $itemNum) + public static function gameItemMarketBuy($actionType, $owner_address, $price, $itemId, $itemNum) { if (!($actionType > Transaction::BUY_BEGIN_ACTION_TYPE && $actionType < Transaction::BUY_END_ACTION_TYPE)) { @@ -118,6 +118,7 @@ class BlockChainService { 'a' => 'buy', 'account' => $account, 'price' => $price, + 'owner_address' => $owner_address, ); { $url = self::getWeb3ServiceUrl();