diff --git a/third_party/phpcommon b/third_party/phpcommon index 9f75ccab..55e2f9de 160000 --- a/third_party/phpcommon +++ b/third_party/phpcommon @@ -1 +1 @@ -Subproject commit 9f75ccab850c1681c405a496c57acf4b0cca4343 +Subproject commit 55e2f9deb1eb1eede1e8c390c7bd166528632e8a diff --git a/webapp/controller/BlockChainController.class.php b/webapp/controller/BlockChainController.class.php index 35a84d93..d5e99fce 100644 --- a/webapp/controller/BlockChainController.class.php +++ b/webapp/controller/BlockChainController.class.php @@ -34,7 +34,7 @@ use models\BcOrder; use models\Mall; use models\TransactionPrefee; -use BlockChainService; +use services\BlockChainService; class BlockChainController extends BaseAuthedController { @@ -368,7 +368,7 @@ class BlockChainController extends BaseAuthedController { public function buyMallProduct() { - $address = myself()-_getAddress(); + $address = myself()->_getAddress(); if (empty($address)) { myself()-_rspErr(1, 'address not found'); return; diff --git a/webapp/controller/MallController.class.php b/webapp/controller/MallController.class.php index 262ea67b..2623716c 100644 --- a/webapp/controller/MallController.class.php +++ b/webapp/controller/MallController.class.php @@ -47,7 +47,7 @@ class MallController extends BaseAuthedController { break; case 2: { - $orderBy = 'ORDER BY price ' . $orderAsc; + $orderBy = 'ORDER BY length(price) ' . $orderAsc . ', price ' . $orderAsc; } break; } diff --git a/webapp/controller/TempToolsController.class.php b/webapp/controller/TempToolsController.class.php index d6bcf3c9..d0a51f01 100644 --- a/webapp/controller/TempToolsController.class.php +++ b/webapp/controller/TempToolsController.class.php @@ -9,6 +9,11 @@ class TempToolsController extends BaseController { parent::_handlePre(); } + public function test() + { + + } + public function getBattleData() { $targetId = getReqVal('target_id', ''); diff --git a/webapp/controller/ToolsController.class.php b/webapp/controller/ToolsController.class.php index ad9d9b90..959e8a75 100644 --- a/webapp/controller/ToolsController.class.php +++ b/webapp/controller/ToolsController.class.php @@ -1,5 +1,7 @@ _rspErr(1, '解析失败'); + return; + } + if (phpcommon\bnCmp($priceBn, phpcommon\bnInit('0')) <= 0) { + myself()->_rspErr(1, '不能为负数'); + return; + } + if (phpcommon\bnCmp($priceBn, phpcommon\bnInit('10000000000000')) >= 0) { + myself()->_rspErr(1, '超过限制'); + return; + } + myself()->_rspOk(); + } + public function clearDB() { global $g_conf_mysql_cluster; diff --git a/webapp/services/BlockChainService.php b/webapp/services/BlockChainService.php index f6ce4933..591c05ba 100644 --- a/webapp/services/BlockChainService.php +++ b/webapp/services/BlockChainService.php @@ -123,7 +123,7 @@ class BlockChainService { 'c' => 'GameItemMarket', 'a' => 'buy', 'account' => $account, - 'currency' => $currency, + 'currency_name' => $currency, 'price' => $price, 'seller' => $seller, 'order_id' => $orderId,