作者 李宇航

合并分支 'master-server' 到 'master'

gx添加关键词前后缀



查看合并请求 !1119
<?php
namespace App\Console\Commands\DayCount;
use App\Models\Inquiry\InquiryInfo;
use Illuminate\Console\Command;
/**
* @remark :
* @class :InquiryDelay.php
* @author :lyh
* @time :2023/7/14 10:16
*/
class InquiryDelay extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'inquiry_delay';
/**
* The console command description.
*
* @var string
*/
protected $description = '延时询盘转发(暂时弃用)';
/**
* @remark :延时询盘转发
* @name :handle
* @author :lyh
* @method :post
* @time :2023/7/14 10:17
*/
public function handle()
{
$inquiryInfoModel = new InquiryInfo();
$param = $inquiryInfoModel->formatQuery(['status'=>$inquiryInfoModel::STATUS_FOUR])->orderBy('send_time','asc')->first();
if(!empty($param)){
$time = date('Y-m-d H:i:s');
if($time >= $param['send_time']){
$data = [];
//TODO::处理转发的url
$arr_url = explode(',',$param['forward_url']);
foreach ($arr_url as $v){
$data['url'] = $v;
$this->inquiryForward($data);
}
$inquiryInfoModel->edit(['status'=>$inquiryInfoModel::STATUS_THREE],['id'=>$param['id']]);
}
}
return true;
}
/**
* @remark :询盘转发
* @name :inquiryForward
* @author :lyh
* @method :post
* @time :2023/7/13 14:39
*/
public function inquiryForward($post_data){
$url = 'https://form.globalso.com/api/external-interface/add/fa043f9cbec6b38f';
$post_data_new = [];
$post_data_new['refer'] = $post_data['url'];
$post_data_new['name'] = $post_data['name'];
$post_data_new['email'] = $post_data['email'];
$post_data_new['phone'] = $post_data['phone'];
$post_data_new['ip'] = $post_data['ip'];
$post_data_new['message'] = $post_data['message'];
$post_data_new['submit_time'] = date('Y-m-d H:i:s',time()+20);
$token = md5($post_data_new['refer'].$post_data_new['name'].$post_data_new['ip'].date("Y-m-d",time()));
$post_data_new['token'] = $token;
$header = array(
'CLIENT-IP: '.$post_data['ip'],
'X-FORWARDED-FOR: '.$post_data['ip']
);
return http_post($url,$post_data_new,$header);
}
}
... ... @@ -20,13 +20,11 @@ class Kernel extends ConsoleKernel
$schedule->command('template_label')->dailyAt('01:00')->withoutOverlapping(1);//最新模块
$schedule->command('popular_template_label')->dailyAt('01:30')->withoutOverlapping(1);//热门模块
// $schedule->command('inspire')->hourly();
// $schedule->command('remain_day')->dailyAt('09:30')->withoutOverlapping(1); // 项目剩余服务时长
$schedule->command('rank_data_task')->everyMinute()->withoutOverlapping(1); // 排名数据更新任务
$schedule->command('service_count')->dailyAt('01:00')->withoutOverlapping(1); //服务器使用情况,每天凌晨1点执行一次
// $schedule->command('web_traffic_special')->everyMinute()->withoutOverlapping(1); // 特殊引流
// $schedule->command('web_traffic_russia_special')->everyMinute()->withoutOverlapping(1); // 特殊引流
$schedule->command('sync_channel')->dailyAt('06:00')->withoutOverlapping(1); // 渠道信息,每天执行一次
// $schedule->command('inquiry_delay')->everyMinute()->withoutOverlapping(1);//TODO::上线放开,转发询盘,每分钟执行一次
$schedule->command('inquiry_count')->dailyAt('01:00')->withoutOverlapping(1); // 询盘统计数据,每天凌晨执行一次
// $schedule->command('domain_info')->dailyAt('01:20')->withoutOverlapping(1);// 更新域名|证书结束时间,每天凌晨1点执行一次
$schedule->command('share_user')->dailyAt('01:20')->withoutOverlapping(1);// 每天凌晨1点执行一次
... ...
... ... @@ -12,7 +12,6 @@ namespace App\Http\Controllers\Bside\BCom;
use App\Enums\Common\Code;
use App\Helper\Arr;
use App\Http\Controllers\Bside\BaseController;
use App\Jobs\UpdatePageJob;
use App\Models\Blog\Blog;
use App\Models\Blog\BlogCategory;
use App\Models\Com\NoticeLog;
... ...