1
This commit is contained in:
parent
354dfb34d0
commit
268a3713d6
@ -31,7 +31,7 @@ class WalletController extends BaseController {
|
|||||||
$netId = getReqVal('net_id', '');
|
$netId = getReqVal('net_id', '');
|
||||||
$amount = getReqVal('amount', '');
|
$amount = getReqVal('amount', '');
|
||||||
$times = Withdrawal::getTodayWithdrawalTimes($account);
|
$times = Withdrawal::getTodayWithdrawalTimes($account);
|
||||||
if ($times) {
|
if ($times > 200) {
|
||||||
myself()->_rspErr(1, 'More withdrawals than today');
|
myself()->_rspErr(1, 'More withdrawals than today');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -40,7 +40,7 @@ class WalletController extends BaseController {
|
|||||||
'seq_id' => $seqId
|
'seq_id' => $seqId
|
||||||
));
|
));
|
||||||
if ($this->isTestMode()) {
|
if ($this->isTestMode()) {
|
||||||
Withdrawal::testOk($seqid, $account, $type, $netId, $amount);
|
Withdrawal::testOk($seqId, $account, $type, $netId, $amount);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ class Withdrawal extends BaseModel {
|
|||||||
public static function getTodayWithdrawalTimes($account)
|
public static function getTodayWithdrawalTimes($account)
|
||||||
{
|
{
|
||||||
$row = myself()->_getMarketMysql()->execQueryOne(
|
$row = myself()->_getMarketMysql()->execQueryOne(
|
||||||
'SELECT COUNT(1) AS times FROM t_withdrawal WHERE account=:account AND createtime>=:now_dayseconds AND createtime:<=:now_dayseconds + 3600 * 24;',
|
'SELECT COUNT(1) AS times FROM t_withdrawal WHERE account=:account AND createtime>=:now_dayseconds AND createtime<=:now_dayseconds + 3600 * 24;',
|
||||||
array(
|
array(
|
||||||
':account' => $account,
|
':account' => $account,
|
||||||
':now_dayseconds' => myself()->_getNowDaySeconds()
|
':now_dayseconds' => myself()->_getNowDaySeconds()
|
||||||
@ -40,10 +40,10 @@ class Withdrawal extends BaseModel {
|
|||||||
return $seqId;
|
return $seqId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function get($seqId)
|
public static function find($seqId)
|
||||||
{
|
{
|
||||||
$row = SqlHelper::ormSelectOne(
|
$row = SqlHelper::ormSelectOne(
|
||||||
myself()->_getSelfMysql(),
|
myself()->_getMarketMysql(),
|
||||||
't_withdrawal',
|
't_withdrawal',
|
||||||
array(
|
array(
|
||||||
'idx' => $seqId,
|
'idx' => $seqId,
|
||||||
@ -55,7 +55,7 @@ class Withdrawal extends BaseModel {
|
|||||||
public static function testOk($idx, $account, $type, $netId, $amount)
|
public static function testOk($idx, $account, $type, $netId, $amount)
|
||||||
{
|
{
|
||||||
SqlHelper::update(
|
SqlHelper::update(
|
||||||
myself()->_getSelfMysql(),
|
myself()->_getMarketMysql(),
|
||||||
't_withdrawal',
|
't_withdrawal',
|
||||||
array(
|
array(
|
||||||
'idx' => $idx,
|
'idx' => $idx,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user