1
This commit is contained in:
parent
1ca2cb320b
commit
f0e3feffe5
2
third_party/phpcommon
vendored
2
third_party/phpcommon
vendored
@ -1 +1 @@
|
||||
Subproject commit 9f75ccab850c1681c405a496c57acf4b0cca4343
|
||||
Subproject commit 55e2f9deb1eb1eede1e8c390c7bd166528632e8a
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -9,6 +9,11 @@ class TempToolsController extends BaseController {
|
||||
parent::_handlePre();
|
||||
}
|
||||
|
||||
public function test()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function getBattleData()
|
||||
{
|
||||
$targetId = getReqVal('target_id', '');
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
require_once('phpcommon/bignumber.php');
|
||||
|
||||
class ToolsController extends BaseController {
|
||||
|
||||
public function _handlePre()
|
||||
@ -11,6 +13,25 @@ class ToolsController extends BaseController {
|
||||
}
|
||||
}
|
||||
|
||||
public function test()
|
||||
{
|
||||
$price = getReqVal('price', '');
|
||||
$priceBn = phpcommon\bnInit($price);
|
||||
if ($priceBn === false) {
|
||||
myself()->_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;
|
||||
|
@ -123,7 +123,7 @@ class BlockChainService {
|
||||
'c' => 'GameItemMarket',
|
||||
'a' => 'buy',
|
||||
'account' => $account,
|
||||
'currency' => $currency,
|
||||
'currency_name' => $currency,
|
||||
'price' => $price,
|
||||
'seller' => $seller,
|
||||
'order_id' => $orderId,
|
||||
|
Loading…
x
Reference in New Issue
Block a user