diff --git a/sql/gamedb.sql b/sql/gamedb.sql index 40ea46b7..aafe43ad 100644 --- a/sql/gamedb.sql +++ b/sql/gamedb.sql @@ -1433,7 +1433,6 @@ CREATE TABLE `t_market` ( `c_lv` int(11) NOT NULL DEFAULT '0' COMMENT '缓存-级别', `c_quality` int(11) NOT NULL DEFAULT '0' COMMENT '缓存-品阶', `c_durability` float NOT NULL DEFAULT '0' COMMENT '缓存-能量', - `c_id` int(11) NOT NULL DEFAULT '0' COMMENT '缓存-id', `status` int(11) NOT NULL DEFAULT '0' COMMENT 'status', `activated` int(11) NOT NULL DEFAULT '0' COMMENT 'activated', `selltime` int(11) COMMENT 'selltime', diff --git a/webapp/services/callback/MarketSellOrderOk.php b/webapp/services/callback/MarketSellOrderOk.php index b5c5b46b..2186a7e1 100644 --- a/webapp/services/callback/MarketSellOrderOk.php +++ b/webapp/services/callback/MarketSellOrderOk.php @@ -3,11 +3,14 @@ namespace services; require_once('phpcommon/bchelper.php'); + +require_once('models/Nft.php'); require_once('models/Market.php'); require_once ('services/callback/common/SignatureService.php'); use phpcommon\SqlHelper; +use models\Nft; use models\Market; class MarketSellOrderOk { @@ -26,6 +29,25 @@ class MarketSellOrderOk { $currency = getReqVal('currency', ''); $price = getReqVal('price', ''); + $fieldsKv = array(); + $nftDb = Nft::getNft($row['token_id']); + if ($nftDb) { + try { + $nftDetail = Nft::toDto($nftDb); + if ($nftDetail) { + $fieldsKv['c_name'] = $nftDetail['info']['name']; + $fieldsKv['c_job'] = $nftDetail['info']['job']; + $fieldsKv['c_lv'] = $nftDetail['info']['hero_lv']; + $fieldsKv['c_quality'] = $nftDetail['info']['quality']; + $fieldsKv['c_durability'] = $nftDetail['info']['hero_tili']; + $fieldsKv['c_type'] = 1; + } + } catch(Exception $e) { + $fieldsKv = array(); + error_log('MarketSellOrderOk error:' . $e); + } + } + Market::add( $orderId, $netId, @@ -34,7 +56,8 @@ class MarketSellOrderOk { $nftToken, $amount, $currency, - $price + $price, + $fieldsKv ); myself()->_rspOk(); }