Commit 27829f87 authored by zhoujun's avatar zhoujun

调整日志类别

parent a9c941a4
Pipeline #2183 passed with stage
in 0 seconds
......@@ -14,6 +14,7 @@ use App\Models\WarnWaitModel;
use App\Models\UserCashModel;
use App\Models\SyceeWithdrawModel;
use App\Models\WarnPeopleModel;
use App\Models\WarnLogModel;
class ScriptService implements IScriptService
{
......@@ -372,6 +373,8 @@ class ScriptService implements IScriptService
public function getSendDDMsg()
{
$sends = WarnWaitModel::where('status',0)->limit(100)->get();
$logs = [];
foreach($sends as $send){
$message = '';
$mobiles = str_replace('#',',',$send->people_phone);
......@@ -382,7 +385,24 @@ class ScriptService implements IScriptService
postCurlJson(config(env('ENVIRONMENT') . '.DINGDING_URL'), $submitData, []);
$send->status = 1;
$send->save();
}
$config = WarnConfigModel::where('id',$send->config_id)->select('id','platform','channel')->first();
$tem['ymd'] = $send->ymd;
$tem['platform'] = $config->platform ?? 0;
$tem['channel'] = $config->channel ?? 0;
$tem['cash'] = $send->cash;
$tem['status'] = 1;
$tem['type'] = $send->type;
$tem['config_id'] = $send->config_id;
$tem['people_id'] = $send->people_id;
$tem['msg'] = $message;
$tem['remark'] = '';
$tem['send_time'] = $this->time;
$tem['created_at'] = $this->time;
$tem['updated_at'] = $this->time;
$logs[] = $tem;
}
if(!empty($logs)) WarnLogModel::insert($logs);
}
}
\ No newline at end of file
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