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