Merge branch 'master' of http://47.244.231.31:8099/zhl/globalso-v6
正在显示
5 个修改的文件
包含
131 行增加
和
6 行删除
| 1 | +<?php | ||
| 2 | + | ||
| 3 | +namespace App\Console\Commands\DayCount; | ||
| 4 | + | ||
| 5 | +use App\Models\Inquiry\InquiryInfo; | ||
| 6 | +use Illuminate\Console\Command; | ||
| 7 | + | ||
| 8 | +/** | ||
| 9 | + * @remark : | ||
| 10 | + * @class :InquiryDelay.php | ||
| 11 | + * @author :lyh | ||
| 12 | + * @time :2023/7/14 10:16 | ||
| 13 | + */ | ||
| 14 | +class InquiryDelay extends Command | ||
| 15 | +{ | ||
| 16 | + /** | ||
| 17 | + * The name and signature of the console command. | ||
| 18 | + * | ||
| 19 | + * @var string | ||
| 20 | + */ | ||
| 21 | + protected $signature = 'inquiry_delay'; | ||
| 22 | + | ||
| 23 | + /** | ||
| 24 | + * The console command description. | ||
| 25 | + * | ||
| 26 | + * @var string | ||
| 27 | + */ | ||
| 28 | + protected $description = '延时询盘转发(暂时弃用)'; | ||
| 29 | + | ||
| 30 | + /** | ||
| 31 | + * @remark :延时询盘转发 | ||
| 32 | + * @name :handle | ||
| 33 | + * @author :lyh | ||
| 34 | + * @method :post | ||
| 35 | + * @time :2023/7/14 10:17 | ||
| 36 | + */ | ||
| 37 | + public function handle() | ||
| 38 | + { | ||
| 39 | +// $inquiryInfoModel = new InquiryInfo(); | ||
| 40 | +// $param = $inquiryInfoModel->formatQuery(['status'=>$inquiryInfoModel::STATUS_FOUR])->orderBy('send_time','asc')->first(); | ||
| 41 | +// if(!empty($param)){ | ||
| 42 | +// $time = date('Y-m-d H:i:s'); | ||
| 43 | +// if($time >= $param['send_time']){ | ||
| 44 | +// $data = []; | ||
| 45 | +// //TODO::处理转发的url | ||
| 46 | +// $arr_url = explode(',',$param['forward_url']); | ||
| 47 | +// foreach ($arr_url as $v){ | ||
| 48 | +// $data['url'] = $v; | ||
| 49 | +// $this->inquiryForward($data); | ||
| 50 | +// } | ||
| 51 | +// $inquiryInfoModel->edit(['status'=>$inquiryInfoModel::STATUS_THREE],['id'=>$param['id']]); | ||
| 52 | +// } | ||
| 53 | +// } | ||
| 54 | + return true; | ||
| 55 | + } | ||
| 56 | + | ||
| 57 | + /** | ||
| 58 | + * @remark :询盘转发 | ||
| 59 | + * @name :inquiryForward | ||
| 60 | + * @author :lyh | ||
| 61 | + * @method :post | ||
| 62 | + * @time :2023/7/13 14:39 | ||
| 63 | + */ | ||
| 64 | + public function inquiryForward($post_data){ | ||
| 65 | + $url = 'https://form.globalso.com/api/external-interface/add/fa043f9cbec6b38f'; | ||
| 66 | + $post_data_new = []; | ||
| 67 | + $post_data_new['refer'] = $post_data['url']; | ||
| 68 | + $post_data_new['name'] = $post_data['name']; | ||
| 69 | + $post_data_new['email'] = $post_data['email']; | ||
| 70 | + $post_data_new['phone'] = $post_data['phone']; | ||
| 71 | + $post_data_new['ip'] = $post_data['ip']; | ||
| 72 | + $post_data_new['message'] = $post_data['message']; | ||
| 73 | + $post_data_new['submit_time'] = date('Y-m-d H:i:s',time()+20); | ||
| 74 | + $token = md5($post_data_new['refer'].$post_data_new['name'].$post_data_new['ip'].date("Y-m-d",time())); | ||
| 75 | + $post_data_new['token'] = $token; | ||
| 76 | + $header = array( | ||
| 77 | + 'CLIENT-IP: '.$post_data['ip'], | ||
| 78 | + 'X-FORWARDED-FOR: '.$post_data['ip'] | ||
| 79 | + ); | ||
| 80 | + return http_post($url,$post_data_new,$header); | ||
| 81 | + } | ||
| 82 | + | ||
| 83 | +} |
| @@ -293,7 +293,7 @@ class BTemplateLogic extends BaseLogic | @@ -293,7 +293,7 @@ class BTemplateLogic extends BaseLogic | ||
| 293 | } | 293 | } |
| 294 | $mainModel = new TemplateTypeMain(); | 294 | $mainModel = new TemplateTypeMain(); |
| 295 | $info = $mainModel->read(['type'=>$type,'is_list'=>$is_list]); | 295 | $info = $mainModel->read(['type'=>$type,'is_list'=>$is_list]); |
| 296 | - return $info['main_html']; | 296 | + return $info['main_html'] ?? ''; |
| 297 | } | 297 | } |
| 298 | 298 | ||
| 299 | /** | 299 | /** |
| @@ -2,7 +2,6 @@ | @@ -2,7 +2,6 @@ | ||
| 2 | 2 | ||
| 3 | namespace App\Jobs; | 3 | namespace App\Jobs; |
| 4 | 4 | ||
| 5 | -use App\Events\CopyImageFile; | ||
| 6 | use App\Models\File\File as FileModel; | 5 | use App\Models\File\File as FileModel; |
| 7 | use App\Models\File\Image as ImageModel; | 6 | use App\Models\File\Image as ImageModel; |
| 8 | use App\Services\AmazonS3Service; | 7 | use App\Services\AmazonS3Service; |
| @@ -2,11 +2,7 @@ | @@ -2,11 +2,7 @@ | ||
| 2 | 2 | ||
| 3 | namespace App\Jobs; | 3 | namespace App\Jobs; |
| 4 | 4 | ||
| 5 | -use App\Events\CopyImageFile; | ||
| 6 | use App\Models\File\ErrorFile; | 5 | use App\Models\File\ErrorFile; |
| 7 | -use App\Models\File\File as FileModel; | ||
| 8 | -use App\Models\File\Image as ImageModel; | ||
| 9 | -use App\Services\AmazonS3Service; | ||
| 10 | use Illuminate\Bus\Queueable; | 6 | use Illuminate\Bus\Queueable; |
| 11 | use Illuminate\Contracts\Queue\ShouldQueue; | 7 | use Illuminate\Contracts\Queue\ShouldQueue; |
| 12 | use Illuminate\Foundation\Bus\Dispatchable; | 8 | use Illuminate\Foundation\Bus\Dispatchable; |
app/Jobs/UpdatePageJob.php
0 → 100644
| 1 | +<?php | ||
| 2 | +/** | ||
| 3 | + * @remark : | ||
| 4 | + * @name :UpdatePageJob.php | ||
| 5 | + * @author :lyh | ||
| 6 | + * @method :post | ||
| 7 | + * @time :2025/2/15 17:41 | ||
| 8 | + */ | ||
| 9 | + | ||
| 10 | +namespace App\Jobs; | ||
| 11 | + | ||
| 12 | +use Illuminate\Bus\Queueable; | ||
| 13 | +use Illuminate\Contracts\Queue\ShouldQueue; | ||
| 14 | +use Illuminate\Foundation\Bus\Dispatchable; | ||
| 15 | +use Illuminate\Queue\InteractsWithQueue; | ||
| 16 | +use Illuminate\Queue\SerializesModels; | ||
| 17 | + | ||
| 18 | +class UpdatePageJob implements ShouldQueue | ||
| 19 | +{ | ||
| 20 | + use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; | ||
| 21 | + public $tries = 3; // 可配置任务重试次数 | ||
| 22 | + | ||
| 23 | + protected $param; | ||
| 24 | + | ||
| 25 | + /** | ||
| 26 | + * Create a new job instance. | ||
| 27 | + * | ||
| 28 | + * @param CopyImageFile $event | ||
| 29 | + * @return void | ||
| 30 | + */ | ||
| 31 | + public function __construct($data) | ||
| 32 | + { | ||
| 33 | + $this->param = $data; | ||
| 34 | + } | ||
| 35 | + | ||
| 36 | + /** | ||
| 37 | + * Execute the job. | ||
| 38 | + * | ||
| 39 | + * @return void | ||
| 40 | + */ | ||
| 41 | + public function handle() | ||
| 42 | + { | ||
| 43 | + echo 'sj---:'.json_encode($this->param); | ||
| 44 | + return true; | ||
| 45 | + } | ||
| 46 | + | ||
| 47 | +} |
-
请 注册 或 登录 后发表评论