From 0e7f7565ea1314ae05601dc9a75eb876b54972e6 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 8 Nov 2022 17:45:03 +0800 Subject: [PATCH 1/2] bug for buygoodnew --- webapp/controller/ShopController.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/webapp/controller/ShopController.class.php b/webapp/controller/ShopController.class.php index 74228cfb..c0d4a031 100644 --- a/webapp/controller/ShopController.class.php +++ b/webapp/controller/ShopController.class.php @@ -162,7 +162,9 @@ class ShopController extends BaseAuthedController { $itemMeta = mt\Item::get($row['goods_id']); $propertyChgService = new services\PropertyChgService(); - $this->internalAddItem($propertyChgService, $itemMeta); + for ($i = 0; $i<$goods_num; $i++) { + $this->internalAddItem($propertyChgService, $itemMeta); + } $awardService = new services\AwardService(); $awardService->addItem($row['goods_id'], $goods_num); ShopBuyRecord::add($id, $goods_num); From 899a84d3f3b677d63710d3beceb227d3d32caa91 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 8 Nov 2022 18:26:30 +0800 Subject: [PATCH 2/2] 1 --- webapp/controller/BagController.class.php | 4 ++-- webapp/controller/BlockChainController.class.php | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/webapp/controller/BagController.class.php b/webapp/controller/BagController.class.php index 010f6f66..42f8f3cb 100644 --- a/webapp/controller/BagController.class.php +++ b/webapp/controller/BagController.class.php @@ -191,12 +191,12 @@ class BagController extends BaseAuthedController { $errMsg = 'Parameter error name length must not be greater than 12'; return; } - if(!preg_match("/^[a-z\d]*$/i",$name)) + /*if(!preg_match("/^[a-z\d]*$/i",$name)) { $errCode = 5; $errMsg = 'Excuse me , the name you entered is in the wrong format.'; return; - } + }*/ $nameService = new services\NameService(); if (!$nameService->verifyNameSign($name, $nameSign)){ $errCode = 5; diff --git a/webapp/controller/BlockChainController.class.php b/webapp/controller/BlockChainController.class.php index e7a16ed0..a97af43c 100644 --- a/webapp/controller/BlockChainController.class.php +++ b/webapp/controller/BlockChainController.class.php @@ -41,6 +41,7 @@ class BlockChainController extends BaseAuthedController { ))); return; } + error_log(json_encode($_REQUEST)); } public function getTransactionList() @@ -266,6 +267,9 @@ class BlockChainController extends BaseAuthedController { myself()->_rspErr(1, 'num paramater error'); return; } + error_log(json_encode( + $_REQUEST + )); if (!$itemDb || $itemDb['item_num'] < $num) { myself()->_rspErr(1, 'item not enough'); return;