Compare commits
4 Commits
de52536a37
...
755cf15794
Author | SHA1 | Date | |
---|---|---|---|
755cf15794 | |||
46a4ba7694 | |||
d136ca240f | |||
6ae1f5603a |
@ -118,6 +118,17 @@ class WithdrawController
|
|||||||
if ($money_no > $user->money) {
|
if ($money_no > $user->money) {
|
||||||
return ApiResponseApp::error(null, '提现积分不足');
|
return ApiResponseApp::error(null, '提现积分不足');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取当前时间的 3 分钟前
|
||||||
|
$threeMinutesAgo = Carbon::now()->subMinutes(3);
|
||||||
|
|
||||||
|
// 使用 exists() 查询,判断是否有记录
|
||||||
|
if (Withdraw::where('user_id', $user_id)
|
||||||
|
->where('created_at', '>=', $threeMinutesAgo)
|
||||||
|
->exists()
|
||||||
|
) {
|
||||||
|
return ApiResponseApp::error(null, '提现频繁请三分钟后再试');
|
||||||
|
}
|
||||||
//提现金额
|
//提现金额
|
||||||
$rate = ExchangeRate::where('type', 'BDT')->get();
|
$rate = ExchangeRate::where('type', 'BDT')->get();
|
||||||
$money = (int)$money_no / 100 * $rate[0]['points'];
|
$money = (int)$money_no / 100 * $rate[0]['points'];
|
||||||
|
@ -10,6 +10,7 @@ use support\Model;
|
|||||||
* @property string $updated_at 更新时间
|
* @property string $updated_at 更新时间
|
||||||
* @property string $key key
|
* @property string $key key
|
||||||
* @property string $value value
|
* @property string $value value
|
||||||
|
* @property string $remark remark 备注
|
||||||
*/
|
*/
|
||||||
class Dictionary extends Model
|
class Dictionary extends Model
|
||||||
{
|
{
|
||||||
|
@ -6,6 +6,7 @@ use app\dao\UserPhoneLogDao;
|
|||||||
use App\Utils\API\SendCode;
|
use App\Utils\API\SendCode;
|
||||||
use app\model\UserPhone;
|
use app\model\UserPhone;
|
||||||
use app\dao\UserRewardDao;
|
use app\dao\UserRewardDao;
|
||||||
|
use app\model\Dictionary;
|
||||||
use support\Log;
|
use support\Log;
|
||||||
use Workerman\Crontab\Crontab;
|
use Workerman\Crontab\Crontab;
|
||||||
use GuzzleHttp\Client;
|
use GuzzleHttp\Client;
|
||||||
@ -22,6 +23,8 @@ class Task2
|
|||||||
new Crontab('0 */1 * * * *', function () {
|
new Crontab('0 */1 * * * *', function () {
|
||||||
$start_time = time();
|
$start_time = time();
|
||||||
Rocketgo::test_login();
|
Rocketgo::test_login();
|
||||||
|
//查询系统配置 是否自动删除用户
|
||||||
|
$autodelete=Dictionary::where('key','autodelete')->first();
|
||||||
Log::info("查询任务开始");
|
Log::info("查询任务开始");
|
||||||
// 获取账号列表
|
// 获取账号列表
|
||||||
$res = Rocketgo::account_list();
|
$res = Rocketgo::account_list();
|
||||||
@ -44,7 +47,7 @@ class Task2
|
|||||||
$updateData = [];
|
$updateData = [];
|
||||||
|
|
||||||
foreach ($res as $v) {
|
foreach ($res as $v) {
|
||||||
if ($v['failedReason'] !== null) {
|
if ($v['failedReason'] !== null && $autodelete->value=='1') {
|
||||||
SendCode::delWS($v['username']);
|
SendCode::delWS($v['username']);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -28,5 +28,6 @@ return [
|
|||||||
'支付错误:'=>'Payment error:',
|
'支付错误:'=>'Payment error:',
|
||||||
'等待银行打款'=>'Waiting for bank transfer',
|
'等待银行打款'=>'Waiting for bank transfer',
|
||||||
'已到账'=>'Already arrived',
|
'已到账'=>'Already arrived',
|
||||||
'提现'=>'Withdraw cash'
|
'提现'=>'Withdraw cash',
|
||||||
|
'提现频繁请三分钟后再试'=>'Frequent withdrawals, please try again after three minutes'
|
||||||
];
|
];
|
||||||
|
@ -28,5 +28,6 @@ return [
|
|||||||
'支付错误:'=>'支付错误:',
|
'支付错误:'=>'支付错误:',
|
||||||
'等待银行打款'=>'等待银行打款',
|
'等待银行打款'=>'等待银行打款',
|
||||||
'已到账'=>'已到账',
|
'已到账'=>'已到账',
|
||||||
'提现'=>'提现'
|
'提现'=>'提现',
|
||||||
|
'提现频繁请三分钟后再试'=>'提现频繁请三分钟后再试'
|
||||||
];
|
];
|
Loading…
x
Reference in New Issue
Block a user