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\Mall;
|
||||||
use models\TransactionPrefee;
|
use models\TransactionPrefee;
|
||||||
|
|
||||||
use BlockChainService;
|
use services\BlockChainService;
|
||||||
|
|
||||||
class BlockChainController extends BaseAuthedController {
|
class BlockChainController extends BaseAuthedController {
|
||||||
|
|
||||||
@ -368,7 +368,7 @@ class BlockChainController extends BaseAuthedController {
|
|||||||
|
|
||||||
public function buyMallProduct()
|
public function buyMallProduct()
|
||||||
{
|
{
|
||||||
$address = myself()-_getAddress();
|
$address = myself()->_getAddress();
|
||||||
if (empty($address)) {
|
if (empty($address)) {
|
||||||
myself()-_rspErr(1, 'address not found');
|
myself()-_rspErr(1, 'address not found');
|
||||||
return;
|
return;
|
||||||
|
@ -47,7 +47,7 @@ class MallController extends BaseAuthedController {
|
|||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
{
|
{
|
||||||
$orderBy = 'ORDER BY price ' . $orderAsc;
|
$orderBy = 'ORDER BY length(price) ' . $orderAsc . ', price ' . $orderAsc;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,11 @@ class TempToolsController extends BaseController {
|
|||||||
parent::_handlePre();
|
parent::_handlePre();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function test()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public function getBattleData()
|
public function getBattleData()
|
||||||
{
|
{
|
||||||
$targetId = getReqVal('target_id', '');
|
$targetId = getReqVal('target_id', '');
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
require_once('phpcommon/bignumber.php');
|
||||||
|
|
||||||
class ToolsController extends BaseController {
|
class ToolsController extends BaseController {
|
||||||
|
|
||||||
public function _handlePre()
|
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()
|
public function clearDB()
|
||||||
{
|
{
|
||||||
global $g_conf_mysql_cluster;
|
global $g_conf_mysql_cluster;
|
||||||
|
@ -123,7 +123,7 @@ class BlockChainService {
|
|||||||
'c' => 'GameItemMarket',
|
'c' => 'GameItemMarket',
|
||||||
'a' => 'buy',
|
'a' => 'buy',
|
||||||
'account' => $account,
|
'account' => $account,
|
||||||
'currency' => $currency,
|
'currency_name' => $currency,
|
||||||
'price' => $price,
|
'price' => $price,
|
||||||
'seller' => $seller,
|
'seller' => $seller,
|
||||||
'order_id' => $orderId,
|
'order_id' => $orderId,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user