From 594a42e19f1867b68fb3376e101ba2d485d2c3a2 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Wed, 16 Feb 2022 15:04:31 +0800 Subject: [PATCH] 1 --- sql/marketdb.sql | 1 + webapp/controller/MarketController.class.php | 3 +-- webapp/models/BoxOrder.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sql/marketdb.sql b/sql/marketdb.sql index 42a1c91c..7b3e26d6 100644 --- a/sql/marketdb.sql +++ b/sql/marketdb.sql @@ -39,6 +39,7 @@ CREATE TABLE `t_box_order` ( `nonce` varchar(60) NOT NULL DEFAULT '' COMMENT 'nonce', `signature` varchar(255) NOT NULL DEFAULT '' COMMENT '签名', `item_id` int(11) NOT NULL DEFAULT '0' COMMENT '道具id', + `token_type` int(11) NOT NULL DEFAULT '0' COMMENT 'nft类型 0:英雄 1:枪支 2:芯片', `bc_paid` int(11) NOT NULL DEFAULT '0' COMMENT '是否已支付', `bc_pay_count` int(11) NOT NULL DEFAULT '0' COMMENT '支付次数', `bc_pay_time` int(11) NOT NULL DEFAULT '0' COMMENT '本节点最后一次支付时间', diff --git a/webapp/controller/MarketController.class.php b/webapp/controller/MarketController.class.php index d823cf0d..fab912f5 100644 --- a/webapp/controller/MarketController.class.php +++ b/webapp/controller/MarketController.class.php @@ -296,7 +296,6 @@ class MarketController extends BaseController { 'order_id' => $orderId, 'type' => $type, 'item_id' => $itemId, - 'state' => 0, 'buyer_address' => $buyerAddress, 'token_id' => $tokenId, 'token_type' => $tokenType, @@ -324,7 +323,7 @@ class MarketController extends BaseController { 'state' => 2 )); } else { - if ($orderDb['state'] == 1) { + if ($orderDb['is_paid'] == 1) { myself()->_rspData(array( 'state' => 1 )); diff --git a/webapp/models/BoxOrder.php b/webapp/models/BoxOrder.php index c582bbcf..39ce5f66 100644 --- a/webapp/models/BoxOrder.php +++ b/webapp/models/BoxOrder.php @@ -11,7 +11,7 @@ class BoxOrder extends BaseModel { { $row = myself()->_getMarketMysql()->execQueryOne ('SELECT COUNT(*) AS sold_num FROM t_box_order WHERE batch_idx=:batch_idx AND ' . - ' (state = 1 OR done <> 1);', + ' (bc_paid = 1 OR done <> 1);', array( ':batch_idx' => $batchIdx )); @@ -22,7 +22,7 @@ class BoxOrder extends BaseModel { { $row = myself()->_getMarketMysql()->execQueryOne ('SELECT COUNT(*) AS buy_count FROM t_box_order WHERE batch_idx=:batch_idx AND ' . - ' buyer_address=:buyer_address AND (state = 1 OR done <> 1);', + ' buyer_address=:buyer_address AND (bc_paid = 1 OR done <> 1);', array( ':buyer_address' => $buyerAddress, ':batch_idx' => $batchIdx