From effbf3122ec3f923a047999018b7081432c31d1c Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 8 Aug 2023 09:27:29 +0800 Subject: [PATCH] 1 --- webapp/controller/BlockChainController.class.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/webapp/controller/BlockChainController.class.php b/webapp/controller/BlockChainController.class.php index 9b47f44a..5c0d001a 100644 --- a/webapp/controller/BlockChainController.class.php +++ b/webapp/controller/BlockChainController.class.php @@ -370,7 +370,7 @@ class BlockChainController extends BaseAuthedController { public function buyMallProduct() { $address = myself()-_getAddress(); - if (!$address) { + if (empty($address)) { myself()-_rspErr(1, 'address not found'); return; } @@ -391,9 +391,8 @@ class BlockChainController extends BaseAuthedController { myself()-_rspErr(1, 'goods not found, idx:'); return; } - - if ($price != $goodsDb['price']) { - myself()-_rspErr(1, 'price not match, idx:'); + if ($goodsDb['status'] != Mall::PENDING_STATE) { + myself()-_rspErr(1, 'cant buy'); return; }