This commit is contained in:
aozhiwei 2022-03-28 20:09:14 +08:00
parent 354dfb34d0
commit 268a3713d6
2 changed files with 6 additions and 6 deletions

View File

@ -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);
}
}

View File

@ -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,