Commit 23b4d73e authored by zhoujun's avatar zhoujun

预警配置

parent 21e8b3f2
Pipeline #2219 passed with stage
in 0 seconds
...@@ -36,11 +36,12 @@ class ScriptService implements IScriptService ...@@ -36,11 +36,12 @@ class ScriptService implements IScriptService
$config = self::getWarnConfig(1); $config = self::getWarnConfig(1);
$oneMin = $config['oneMin'] ?? 0; $oneMin = $config['oneMin'] ?? 0;
if(empty($config) || $oneMin == 0) return true; if(empty($config) || $oneMin == 0) return true;
$lastId = self::getLastDataId(2); //$lastId = self::getLastDataId(2);
$lastId = 0;
$warnPeople = self::getWarnPeople(); $warnPeople = self::getWarnPeople();
if(empty($warnPeople)) return true; if(empty($warnPeople)) return true;
$logs = SyceeWithdrawModel::where('status',1)->where('sycee_withdraw.serial','>',$lastId)->where('sycee_withdraw.cash','>',$oneMin)->join('account','sycee_withdraw.user_id','account.user_id')->orderBy('sycee_withdraw.serial','ASC')->select('account.user_id','account.platform','account.platform_id','account.channel','sycee_withdraw.serial','sycee_withdraw.cash','sycee_withdraw.withdraw_time')->limit(100)->get(); $logs = SyceeWithdrawModel::where('sycee_withdraw.status',1)->where('sycee_withdraw.serial','>',$lastId)->where('sycee_withdraw.cash','>',$oneMin)->join('account','sycee_withdraw.user_id','account.user_id')->orderBy('sycee_withdraw.serial','ASC')->select('account.user_id','account.platform','account.platform_id','account.channel','sycee_withdraw.serial','sycee_withdraw.cash','sycee_withdraw.withdraw_time')->limit(100)->get();
$array = []; $array = [];
$maxId = 0; $maxId = 0;
...@@ -51,6 +52,7 @@ class ScriptService implements IScriptService ...@@ -51,6 +52,7 @@ class ScriptService implements IScriptService
if(empty($warnConfig)) continue; if(empty($warnConfig)) continue;
$people = $warnPeople[$key] ?? []; $people = $warnPeople[$key] ?? [];
if(empty($people)) continue; if(empty($people)) continue;
if($log->cash < $warnConfig['one']) continue;
$tem['ymd'] = date('Ymd',strtotime($log->withdraw_time)); $tem['ymd'] = date('Ymd',strtotime($log->withdraw_time));
$tem['config_id'] = $warnConfig['id']; $tem['config_id'] = $warnConfig['id'];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment