作者 赵彬吉
@@ -339,7 +339,7 @@ class AiBlogTask extends Command @@ -339,7 +339,7 @@ class AiBlogTask extends Command
339 ]; 339 ];
340 $res = http_post($c_url, json_encode($param,true)); 340 $res = http_post($c_url, json_encode($param,true));
341 if(empty($res)){ 341 if(empty($res)){
342 - NoticeLog::createLog(NoticeLog::GENERATE_PAGE, json_encode(['c_url'=>$c_url,'c_params'=>$param]),date('Y-m-d H:i:s',time()+300)); 342 + NoticeLog::createLog(NoticeLog::GENERATE_PAGE, ['c_url'=>$c_url,'c_params'=>$param],date('Y-m-d H:i:s',time()+300));
343 } 343 }
344 $this->output('notify: project id: ' . $project_id . ', result: ' . json_encode($res,JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES)); 344 $this->output('notify: project id: ' . $project_id . ', result: ' . json_encode($res,JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES));
345 } 345 }
  1 +<?php
  2 +/**
  3 + * @remark :
  4 + * @name :AuthorityScore.php
  5 + * @author :lyh
  6 + * @method :post
  7 + * @time :2025/7/1 16:43
  8 + */
  9 +
  10 +namespace App\Console\Commands\AuthorityScore;
  11 +
  12 +use App\Models\AuthorityScore\AuthorityScore as AuthorityScoreModel;
  13 +use App\Models\Domain\DomainInfo;
  14 +use App\Models\Project\Project;
  15 +use Illuminate\Console\Command;
  16 +
  17 +class AuthorityScore extends Command
  18 +{
  19 + /**
  20 + * The name and signature of the console command.
  21 + *
  22 + * @var string
  23 + */
  24 + protected $signature = 'authority_score';
  25 +
  26 + /**
  27 + * The console command description.
  28 + *
  29 + * @var string
  30 + */
  31 + protected $description = '白帽外链数据详情,每月统计一次';
  32 +
  33 + /**
  34 + * @remark :执行方法
  35 + * @name :handle
  36 + * @author :lyh
  37 + * @method :post
  38 + * @time :2025/7/1 16:46
  39 + */
  40 + public function handle(){
  41 + $projectModel = new Project();
  42 + $projectIdArr = $projectModel->selectField(['project_type'=>1,'delete_status' => 0,'extend_type'=>0,'type'=>2],'id');
  43 + $domainModel = new DomainInfo();
  44 + $url = 'https://www.cmer.site/api/domain/organic?domain=';
  45 + foreach ($projectIdArr as $item){
  46 + $domainInfo = $domainModel->read(['project_id'=>$item],['domain']);
  47 + if($domainInfo === false){
  48 + continue;
  49 + }
  50 + echo '执行的项目id'.$item.PHP_EOL;
  51 + $url = $url.$domainInfo['domain'];
  52 + $data = http_get($url);
  53 + if(!empty($data) && !empty($data['data'])){
  54 + echo json_encode($data).PHP_EOL;
  55 + $data = $data['data'];
  56 + $this->saveHandleData($data,$item);
  57 + }
  58 + }
  59 + return true;
  60 + }
  61 +
  62 + /**
  63 + * @remark :保存数据
  64 + * @name :handleData
  65 + * @author :lyh
  66 + * @method :post
  67 + * @time :2025/7/1 17:23
  68 + */
  69 + public function saveHandleData($data,$project_id){
  70 + $authorityScoreModel = new AuthorityScoreModel();
  71 + return $authorityScoreModel->addReturnId([
  72 + 'project_id'=>$project_id,
  73 + 'ascore'=>(int)($data['ascore'] ?? 0),
  74 + 'total'=>(int)($data['total'] ?? 0),
  75 + 'domains_num'=>(int)($data['domains_num'] ?? 0),
  76 + 'rank'=>(int)($data['Rank'] ?? 0),
  77 + 'organic_keywords'=>(int)($data['Organic_Keywords'] ?? 0),
  78 + 'organic_traffic'=>(int)($data['Organic_Traffic'] ?? 0),
  79 + 'date'=>date('Y-m-d')
  80 + ]);
  81 + }
  82 +}
@@ -162,68 +162,51 @@ class DownloadProject extends Command @@ -162,68 +162,51 @@ class DownloadProject extends Command
162 return ['file_link'=>url('upload/excel/'.$filename)]; 162 return ['file_link'=>url('upload/excel/'.$filename)];
163 } 163 }
164 164
165 -// public function exportData($data){  
166 -// // 创建一个新的 Excel 电子表格实例  
167 -// $spreadsheet = new Spreadsheet();  
168 -// $sheet = $spreadsheet->getActiveSheet();  
169 -// // 添加表头  
170 -// $sheet->setCellValue('A1', '产品名称');  
171 -//// $sheet->setCellValue('B1', '产品短描述');  
172 -//// $sheet->setCellValue('C1', '产品内容');  
173 -//// $sheet->setCellValue('D1', '产品路由');  
174 -//// $sheet->setCellValue('E1', '产品分类');  
175 -//// $sheet->setCellValue('F1', '产品状态');  
176 -//// $sheet->setCellValue('G1', '产品主图');  
177 -//// $sheet->setCellValue('H1', '产品seo_title');  
178 -//// $sheet->setCellValue('I1', '产品seo_keyword');  
179 -//// $sheet->setCellValue('J1', '产品seo_title');  
180 -// $rowCount = 2;  
181 -// foreach ($data as $v) {  
182 -// $sheet->setCellValue('A' . $rowCount, $v['title']);  
183 -//// $sheet->setCellValue('B' . $rowCount, $v['intro']);  
184 -//// $sheet->setCellValue('C' . $rowCount, $v['content']);  
185 -//// $sheet->setCellValue('D' . $rowCount, $v['url']);  
186 -//// $sheet->setCellValue('E' . $rowCount, $v['category_id_text']);  
187 -//// $sheet->setCellValue('F' . $rowCount, '发布中');  
188 -//// $sheet->setCellValue('G' . $rowCount, $v['images']);  
189 -//// $sheet->setCellValue('H' . $rowCount, $v['seo_mate']['title']);  
190 -//// $sheet->setCellValue('I' . $rowCount, $v['seo_mate']['keyword']);  
191 -//// $sheet->setCellValue('J' . $rowCount, $v['seo_mate']['description']);  
192 -// $rowCount++;  
193 -// }  
194 -// // 创建一个新的 Excel Writer 对象  
195 -// $writer = new Xlsx($spreadsheet);  
196 -// $filename = time().'.xlsx';  
197 -// // 设置导出文件的保存路径和文件名  
198 -// $filePath = public_path('upload/excel/'.$filename);  
199 -// // 导出 Excel 文件  
200 -// $writer->save($filePath);  
201 -// echo date('Y-m-d H:i:s') . 'file_link:'.url('upload/excel/'.$filename) . PHP_EOL;  
202 -// // 返回导出文件的响应  
203 -// return ['file_link'=>url('upload/excel/'.$filename)];  
204 -// }  
205 -//  
206 -// public function downloadItem($filed = ['id','depth','created_at','referrer_url','url','device_port','country','ip']){  
207 -// $visitModel = new Visit();  
208 -// $page = 1;  
209 -// $pageSize = 3000;  
210 -// $lists = $visitModel->lists(['updated_date'=>['between',['2025-02-01','2025-02-31']]],$page,$pageSize,'id',$filed);  
211 -// foreach ($lists as $v){  
212 -// $customer_visit_id[] = $v['id'];  
213 -// }  
214 -// $itemModel = new VisitItem();  
215 -// $itemList = $itemModel->list(['customer_visit_id'=>['in',$customer_visit_id]],['customer_visit_id','url']);  
216 -// foreach ($lists as $key => $value){  
217 -// $sub = [];  
218 -// foreach ($itemList as $sonValue){  
219 -// if($value['id'] == $sonValue['customer_visit_id']){  
220 -// $sub[] = $sonValue;  
221 -// }  
222 -// }  
223 -// $value['sub'] = $sub;  
224 -// $lists[$key] = $value;  
225 -// }  
226 -// return $lists;  
227 -// }  
228 - 165 + /**
  166 + * @remark :导入产品
  167 + * @name :exportProductData
  168 + * @author :lyh
  169 + * @method :post
  170 + * @time :2025/6/30 16:46
  171 + */
  172 + public function exportProductData($data){
  173 + // 创建一个新的 Excel 电子表格实例
  174 + $spreadsheet = new Spreadsheet();
  175 + $sheet = $spreadsheet->getActiveSheet();
  176 + // 添加表头
  177 + $sheet->setCellValue('A1', '产品名称');
  178 + $sheet->setCellValue('B1', '产品短描述');
  179 + $sheet->setCellValue('C1', '产品内容');
  180 + $sheet->setCellValue('D1', '产品路由');
  181 + $sheet->setCellValue('E1', '产品分类');
  182 + $sheet->setCellValue('F1', '产品状态');
  183 + $sheet->setCellValue('G1', '产品主图');
  184 + $sheet->setCellValue('H1', '产品seo_title');
  185 + $sheet->setCellValue('I1', '产品seo_keyword');
  186 + $sheet->setCellValue('J1', '产品seo_title');
  187 + $rowCount = 2;
  188 + foreach ($data as $v) {
  189 + $sheet->setCellValue('A' . $rowCount, $v['title']);
  190 + $sheet->setCellValue('B' . $rowCount, $v['intro']);
  191 + $sheet->setCellValue('C' . $rowCount, $v['content']);
  192 + $sheet->setCellValue('D' . $rowCount, $v['url']);
  193 + $sheet->setCellValue('E' . $rowCount, $v['category_id_text']);
  194 + $sheet->setCellValue('F' . $rowCount, '发布中');
  195 + $sheet->setCellValue('G' . $rowCount, $v['images']);
  196 + $sheet->setCellValue('H' . $rowCount, $v['seo_mate']['title']);
  197 + $sheet->setCellValue('I' . $rowCount, $v['seo_mate']['keyword']);
  198 + $sheet->setCellValue('J' . $rowCount, $v['seo_mate']['description']);
  199 + $rowCount++;
  200 + }
  201 + // 创建一个新的 Excel Writer 对象
  202 + $writer = new Xlsx($spreadsheet);
  203 + $filename = time().'.xlsx';
  204 + // 设置导出文件的保存路径和文件名
  205 + $filePath = public_path('upload/excel/'.$filename);
  206 + // 导出 Excel 文件
  207 + $writer->save($filePath);
  208 + echo date('Y-m-d H:i:s') . 'file_link:'.url('upload/excel/'.$filename) . PHP_EOL;
  209 + // 返回导出文件的响应
  210 + return ['file_link'=>url('upload/excel/'.$filename)];
  211 + }
229 } 212 }
@@ -41,40 +41,10 @@ class lyhDemo extends Command @@ -41,40 +41,10 @@ class lyhDemo extends Command
41 protected $description = '更新路由'; 41 protected $description = '更新路由';
42 42
43 public function handle(){ 43 public function handle(){
44 - return $this->aggregate_keyword_affix();  
45 - }  
46 -  
47 - /**  
48 - * @remark :获取数据  
49 - * @name :aggregate_keyword_affix  
50 - * @author :lyh  
51 - * @method :post  
52 - * @time :2025/6/26 17:58  
53 - */  
54 - public function aggregate_keyword_affix(){  
55 - $projectModel = new Project();  
56 - $lists = $projectModel->list(['delete_status' => 0,'project_type'=>0,'extend_type'=>0,'type'=>['in',[1,2,4,6]]], 'id', ['id']);  
57 - $keywordAffixModel = new AggregateKeywordAffix();  
58 - foreach ($lists as $val){  
59 - $info = $keywordAffixModel->read(['project_id'=>$val['id']]);  
60 -  
61 -  
62 - $prefix = "How To find"."\n"."Why Choose"."\n"."China Top"."\n"."Best Way To Choose"."\n"."Methods To Choose";  
63 - $suffix = "Manufacturer"."\n"."Supplier"."\n"."Products"."\n"."Factory";  
64 - if($info === false){  
65 - echo '执行的项目id:'.$val['id'].PHP_EOL;  
66 - $data = [  
67 - 'project_id'=>$val['id'],  
68 - 'prefix'=>$prefix,  
69 - 'suffix'=>$suffix,  
70 - ];  
71 - $keywordAffixModel->addReturnId($data);  
72 - }  
73 -  
74 - }  
75 return true; 44 return true;
76 } 45 }
77 46
  47 +
78 public function _actionTemplateMain(){ 48 public function _actionTemplateMain(){
79 $data = []; 49 $data = [];
80 $projectModel = new Project(); 50 $projectModel = new Project();
@@ -260,7 +260,7 @@ class KeywordPageAiContent extends Command @@ -260,7 +260,7 @@ class KeywordPageAiContent extends Command
260 'url' => [], 260 'url' => [],
261 'language' => [], 261 'language' => [],
262 ]; 262 ];
263 - NoticeLog::createLog(NoticeLog::GENERATE_PAGE, json_encode(['c_url' => $url, 'c_params' => $param]), date('Y-m-d H:i:s', time() + 300)); 263 + NoticeLog::createLog(NoticeLog::GENERATE_PAGE, ['c_url' => $url, 'c_params' => $param], date('Y-m-d H:i:s', time() + 300));
264 echo getmypid() . ' ' . '更新中请稍后, 更新完成将会发送站内信通知更新结果!' . PHP_EOL; 264 echo getmypid() . ' ' . '更新中请稍后, 更新完成将会发送站内信通知更新结果!' . PHP_EOL;
265 } 265 }
266 } 266 }
  1 +<?php
  2 +/**
  3 + * @remark :
  4 + * @name :UpdateProjectTdk.php
  5 + * @author :lyh
  6 + * @method :post
  7 + * @time :2025/7/2 11:11
  8 + */
  9 +
  10 +namespace App\Console\Commands\Tdk;
  11 +
  12 +use App\Models\Blog\Blog;
  13 +use App\Models\Blog\BlogCategory;
  14 +use App\Models\Com\NoticeLog;
  15 +use App\Models\CustomModule\CustomModuleCategory;
  16 +use App\Models\CustomModule\CustomModuleContent;
  17 +use App\Models\News\News;
  18 +use App\Models\News\NewsCategory;
  19 +use App\Models\Product\Category;
  20 +use App\Models\Product\Keyword;
  21 +use App\Models\Product\Product;
  22 +use App\Models\Project\Project;
  23 +use App\Models\RouteMap\RouteMap;
  24 +use App\Services\ProjectServer;
  25 +use Illuminate\Console\Command;
  26 +use Illuminate\Support\Facades\DB;
  27 +use Illuminate\Support\Facades\Redis;
  28 +use PhpOffice\PhpSpreadsheet\IOFactory;
  29 +use function Aws\default_http_handler;
  30 +
  31 +class UpdateProjectTdk extends Command
  32 +{
  33 + /**
  34 + * The name and signature of the console command.
  35 + *
  36 + * @var string
  37 + */
  38 + protected $signature = 'update_project_tdk';
  39 +
  40 + /**
  41 + * The console command description.
  42 + *
  43 + * @var string
  44 + */
  45 + protected $description = '根据给定的文件更新项目的tdk';
  46 +
  47 +
  48 + public function handle(){
  49 + $noticeLogModel = new NoticeLog();
  50 + while (true){
  51 + $task_id = $this->getTaskId();
  52 + if(empty($task_id)){
  53 + sleep(30);
  54 + continue;
  55 + }
  56 + $info = $noticeLogModel->read(['id'=>$task_id]);
  57 + if($info !== false){
  58 + echo 'start--'.PHP_EOL;
  59 + $project_id = $info['data']['project_id'] ?? 0;
  60 + if(empty($project_id)){
  61 + echo date('Y-m-d H:i:s').'未获取到项目id.'.PHP_EOL;
  62 + $noticeLogModel->edit(['status'=>$noticeLogModel::STATUS_FAIL],['id'=>$task_id]);
  63 + continue;
  64 + }
  65 + ProjectServer::useProject($project_id);
  66 + $url = $info['data']['url'] ?? '';
  67 + if(empty($url)){
  68 + echo date('Y-m-d H:i:s').'未获取到项目更新文件.项目id为:'.$project_id.PHP_EOL;
  69 + //未获取到文件,跳过
  70 + $noticeLogModel->edit(['status'=>$noticeLogModel::STATUS_FAIL],['id'=>$task_id]);
  71 + DB::disconnect('custom_mysql');
  72 + continue;
  73 + }
  74 + // 下载到 Laravel storage 的临时路径
  75 + $tempPath = storage_path('app/temp_url.xlsx');
  76 + file_put_contents($tempPath, file_get_contents($url));
  77 + // 载入 Excel
  78 + try {
  79 + $spreadsheet = IOFactory::load($tempPath);
  80 + $sheet = $spreadsheet->getActiveSheet();
  81 + $rows = $sheet->toArray();
  82 + unlink($tempPath);
  83 + }catch (\Exception $e){
  84 + echo '文件打不开'.PHP_EOL;
  85 + $noticeLogModel->edit(['status'=>$noticeLogModel::STATUS_FAIL],['id'=>$task_id]);
  86 + DB::disconnect('custom_mysql');
  87 + continue;
  88 + }
  89 + $dataRows = array_slice($rows, 1);
  90 + foreach ($dataRows as $item){
  91 + //获取路由
  92 + $route = trim($item[0],'/');
  93 + $route = basename($route);
  94 + $this->updateTdk($route,$item);
  95 + }
  96 + echo date('Y-m-d H:i:s').',end'.PHP_EOL;
  97 + $noticeLogModel->edit(['status'=>$noticeLogModel::STATUS_SUCCESS],['id'=>$task_id]);
  98 + DB::disconnect('custom_mysql');
  99 + }
  100 + }
  101 + return true;
  102 + }
  103 +
  104 + /**
  105 + * @remark :获取任务id
  106 + * @name :getTaskId
  107 + * @author :lyh
  108 + * @method :post
  109 + * @time :2025/7/2 11:19
  110 + */
  111 + public function getTaskId()
  112 + {
  113 + $task_id = Redis::rpop('update_project_tdk_task');
  114 + if (empty($task_id)) {
  115 + $noticeLogModel = new NoticeLog();
  116 + $ids = $noticeLogModel->selectField(['status'=>$noticeLogModel::STATUS_PENDING,'type'=>$noticeLogModel::TYPE_UPDATE_PROJECT_TDK],'id');
  117 + if(!empty($ids)){
  118 + foreach ($ids as $id) {
  119 + Redis::lpush('update_project_tdk_task', $id);
  120 + }
  121 + }
  122 + $task_id = Redis::rpop('update_project_tdk_task');
  123 + }
  124 + return $task_id;
  125 + }
  126 +
  127 + /**
  128 + * @remark :更新tdk
  129 + * @name :updateTdk
  130 + * @author :lyh
  131 + * @method :post
  132 + * @time :2025/7/2 14:59
  133 + */
  134 + public function updateTdk($route,$item){
  135 + $routeMapModel = new RouteMap();
  136 + $routeInfo = $routeMapModel->read(['route'=>$route]);
  137 + if($routeInfo === false){
  138 + return false;
  139 + }
  140 + switch ($routeInfo['source']){
  141 + case $routeMapModel::SOURCE_PRODUCT:
  142 + $productModel = new Product();
  143 + $productModel->edit(['seo_mate'=>json_encode(['title'=>$item[1],'description'=>$item[2],'keyword'=>$item[3]])],['id'=>$routeInfo['source_id']]);
  144 + break;
  145 + case $routeMapModel::SOURCE_PRODUCT_CATE:
  146 + $productCategoryModel = new Category();
  147 + $productCategoryModel->edit(['seo_title'=>$item[1],'seo_des'=>$item[2],'seo_keywords'=>$item[3]],['id'=>$routeInfo['source_id']]);
  148 + break;
  149 + case $routeMapModel::SOURCE_PRODUCT_KEYWORD:
  150 + $productKeywordModel = new Keyword();
  151 + $productKeywordModel->edit(['seo_title'=>$item[1],'seo_description'=>$item[2],'seo_keywords'=>$item[3]],['id'=>$routeInfo['source_id']]);
  152 + break;
  153 + case $routeMapModel::SOURCE_BLOG:
  154 + $blogModel = new Blog();
  155 + $blogModel->edit(['seo_title'=>$item[1],'seo_description'=>$item[2],'seo_keywords'=>$item[3]],['id'=>$routeInfo['source_id']]);
  156 + break;
  157 + case $routeMapModel::SOURCE_BLOG_CATE:
  158 + $blogCateModel = new BlogCategory();
  159 + $blogCateModel->edit(['seo_title'=>$item[1],'seo_des'=>$item[2],'seo_keywords'=>$item[3]],['id'=>$routeInfo['source_id']]);
  160 + break;
  161 + case $routeMapModel::SOURCE_NEWS:
  162 + $newsModel = new News();
  163 + $newsModel->edit(['seo_title'=>$item[1],'seo_description'=>$item[2],'seo_keywords'=>$item[3]],['id'=>$routeInfo['source_id']]);
  164 + break;
  165 + case $routeMapModel::SOURCE_NEWS_CATE:
  166 + $newsCateModel = new NewsCategory();
  167 + $newsCateModel->edit(['seo_title'=>$item[1],'seo_des'=>$item[2],'seo_keywords'=>$item[3]],['id'=>$routeInfo['source_id']]);
  168 + break;
  169 + case $routeMapModel::SOURCE_MODULE:
  170 + $contentModel = new CustomModuleContent();
  171 + $contentModel->edit(['seo_title'=>$item[1],'seo_description'=>$item[2],'seo_keywords'=>$item[3]],['id'=>$routeInfo['source_id']]);
  172 + break;
  173 + case $routeMapModel::SOURCE_MODULE_CATE:
  174 + $categoryModel = new CustomModuleCategory();
  175 + $categoryModel->edit(['seo_title'=>$item[1],'seo_description'=>$item[2],'seo_keywords'=>$item[3]],['id'=>$routeInfo['source_id']]);
  176 + break;
  177 + default:
  178 + break;
  179 + }
  180 + return true;
  181 + }
  182 +}
@@ -260,7 +260,7 @@ class UpdateSeoTdk extends Command @@ -260,7 +260,7 @@ class UpdateSeoTdk extends Command
260 'url' => [], 260 'url' => [],
261 'language'=> [], 261 'language'=> [],
262 ]; 262 ];
263 - NoticeLog::createLog(NoticeLog::GENERATE_PAGE, json_encode(['c_url'=>$url,'c_params'=>$param]),date('Y-m-d H:i:s',time()+300)); 263 + NoticeLog::createLog(NoticeLog::GENERATE_PAGE, ['c_url'=>$url,'c_params'=>$param],date('Y-m-d H:i:s',time()+300));
264 // http_post($url, json_encode($param)); 264 // http_post($url, json_encode($param));
265 echo getmypid() . ' ' . '更新中请稍后, 更新完成将会发送站内信通知更新结果!'. PHP_EOL; 265 echo getmypid() . ' ' . '更新中请稍后, 更新完成将会发送站内信通知更新结果!'. PHP_EOL;
266 } 266 }
@@ -35,7 +35,7 @@ class UpdateSeoTdkCrontab extends Command @@ -35,7 +35,7 @@ class UpdateSeoTdkCrontab extends Command
35 */ 35 */
36 public function handle() 36 public function handle()
37 { 37 {
38 - $project_ids = Project::where('type', Project::TYPE_TWO)->where('uptime', '<=', date('Y-m-d H:i:s'))->pluck('id')->toArray(); 38 + $project_ids = Project::where('type', Project::TYPE_TWO)->where('site_status',0)->where('extend_type',0)->where('delete_status',0)->where('uptime', '<=', date('Y-m-d H:i:s'))->pluck('id')->toArray();
39 foreach ($project_ids as $project_id){ 39 foreach ($project_ids as $project_id){
40 try { 40 try {
41 ProjectUpdateTdk::add_task($project_id); 41 ProjectUpdateTdk::add_task($project_id);
@@ -44,7 +44,7 @@ class UpdateSeoTdkCrontab extends Command @@ -44,7 +44,7 @@ class UpdateSeoTdkCrontab extends Command
44 } 44 }
45 } 45 }
46 46
47 - $project_ids = Project::where('type', Project::TYPE_TWO)->where('tag_page_version', '>' ,1)->where('uptime', '<=', date('Y-m-d H:i:s'))->pluck('id')->toArray(); 47 + $project_ids = Project::where('type', Project::TYPE_TWO)->where('site_status',0)->where('extend_type',0)->where('delete_status',0)->where('tag_page_version', '>' ,1)->where('uptime', '<=', date('Y-m-d H:i:s'))->pluck('id')->toArray();
48 foreach ($project_ids as $project_id){ 48 foreach ($project_ids as $project_id){
49 try { 49 try {
50 ProjectKeywordAiTask::add_task($project_id); 50 ProjectKeywordAiTask::add_task($project_id);
@@ -606,8 +606,8 @@ class Temp extends Command @@ -606,8 +606,8 @@ class Temp extends Command
606 */ 606 */
607 public function change_cname_projects() 607 public function change_cname_projects()
608 { 608 {
609 - $origin_server_id = 20;//原服务器  
610 - $target_server_id = 27;//目标服务器 609 + $origin_server_id = 2;//原服务器
  610 + $target_server_id = 12;//目标服务器
611 611
612 $server_ip_model = new ServersIp(); 612 $server_ip_model = new ServersIp();
613 613
@@ -82,6 +82,7 @@ class FetchTicketProjects extends Command @@ -82,6 +82,7 @@ class FetchTicketProjects extends Command
82 'website' => $item['main_url'] ?? '', 82 'website' => $item['main_url'] ?? '',
83 'test_website' => $item['test_url'] ?? '', 83 'test_website' => $item['test_url'] ?? '',
84 'is_del' => 0, 84 'is_del' => 0,
  85 + 'plan' => $item['plan'] ?? '',
85 ]; 86 ];
86 if (!$project) { 87 if (!$project) {
87 $new = new TicketProject(); 88 $new = new TicketProject();
@@ -174,12 +175,13 @@ class FetchTicketProjects extends Command @@ -174,12 +175,13 @@ class FetchTicketProjects extends Command
174 'is_del' => $is_del, 175 'is_del' => $is_del,
175 'website' => !empty($item->domainInfo->domain) ? 'https://'.$item->domainInfo->domain : '', 176 'website' => !empty($item->domainInfo->domain) ? 'https://'.$item->domainInfo->domain : '',
176 'test_website' => $item->deploy_build->test_domain ?? '', 177 'test_website' => $item->deploy_build->test_domain ?? '',
  178 + 'version' => $item->version,
  179 + 'plan' => $item->planMap()[$item->deploy_build->plan] ?? '',
177 ]; 180 ];
178 if (!$project) { 181 if (!$project) {
179 $project = new TicketProject(); 182 $project = new TicketProject();
180 $project->uuid = $uuid; 183 $project->uuid = $uuid;
181 $project->post_id = $item->post_id; 184 $project->post_id = $item->post_id;
182 - $project->version = 6;  
183 $project->table_id = $item->id; 185 $project->table_id = $item->id;
184 foreach ($fields as $k => $v) { 186 foreach ($fields as $k => $v) {
185 $project->$k = $v; 187 $project->$k = $v;
@@ -112,7 +112,7 @@ if (!function_exists('http_get')) { @@ -112,7 +112,7 @@ if (!function_exists('http_get')) {
112 curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true); 112 curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);
113 curl_setopt($ch1, CURLOPT_ENCODING, ''); 113 curl_setopt($ch1, CURLOPT_ENCODING, '');
114 curl_setopt($ch1, CURLOPT_MAXREDIRS, 10); 114 curl_setopt($ch1, CURLOPT_MAXREDIRS, 10);
115 - curl_setopt($ch1, CURLOPT_TIMEOUT, 120); 115 + curl_setopt($ch1, CURLOPT_TIMEOUT, 60);
116 curl_setopt($ch1, CURLOPT_HTTPHEADER, $header); 116 curl_setopt($ch1, CURLOPT_HTTPHEADER, $header);
117 curl_setopt($ch1, CURLOPT_CONNECTTIMEOUT, $timeout); 117 curl_setopt($ch1, CURLOPT_CONNECTTIMEOUT, $timeout);
118 curl_setopt($ch1, CURLOPT_FOLLOWLOCATION, true); 118 curl_setopt($ch1, CURLOPT_FOLLOWLOCATION, true);
@@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
3 namespace App\Http\Controllers\Api\WorkOrder; 3 namespace App\Http\Controllers\Api\WorkOrder;
4 4
5 use App\Http\Controllers\Api\BaseController; 5 use App\Http\Controllers\Api\BaseController;
  6 +use App\Http\Requests\Api\WorkOrder\TicketListRequest;
6 use App\Http\Requests\Api\WorkOrder\TicketStoreRequest; 7 use App\Http\Requests\Api\WorkOrder\TicketStoreRequest;
7 use App\Models\WorkOrder\TicketLog; 8 use App\Models\WorkOrder\TicketLog;
8 use App\Models\WorkOrder\TicketProject; 9 use App\Models\WorkOrder\TicketProject;
@@ -17,8 +18,9 @@ class TicketController extends BaseController @@ -17,8 +18,9 @@ class TicketController extends BaseController
17 * 18 *
18 * @return \Illuminate\Http\Response 19 * @return \Illuminate\Http\Response
19 */ 20 */
20 - public function index($project_id, Request $request) 21 + public function index(TicketListRequest $request, $project_id)
21 { 22 {
  23 + $validated = $request->validated();
22 $project = TicketProject::where('uuid', $project_id)->first(); 24 $project = TicketProject::where('uuid', $project_id)->first();
23 if (!$project) return $this->error('未找到项目', 404); 25 if (!$project) return $this->error('未找到项目', 404);
24 $page = (int)$request->input('page', 1); 26 $page = (int)$request->input('page', 1);
@@ -30,6 +32,22 @@ class TicketController extends BaseController @@ -30,6 +32,22 @@ class TicketController extends BaseController
30 ]) 32 ])
31 ->where('project_id', $project->id) 33 ->where('project_id', $project->id)
32 // ->where('submit_side', 2) 34 // ->where('submit_side', 2)
  35 + ->when($request->input('status') !== null, function ($query) use ($request) {
  36 + // status 查 gl_tickets.status
  37 + $status = $request->input('status');
  38 + return $query->where('status', $status);
  39 + })
  40 + ->when($request->input('search'), function ($query) use ($request) {
  41 + // search 查 gl_tickets.title 或 gl_ticket_projects.title 或 gl_ticket_projects.company_name
  42 + $search = $request->input('search');
  43 + return $query->where(function ($q) use ($search) {
  44 + $q->where('title', 'like', '%' . $search . '%')
  45 + ->orWhereHas('project', function ($q1) use ($search) {
  46 + $q1->where('title', 'like', '%' . $search . '%')
  47 + ->orWhere('company_name', 'like', '%' . $search . '%');
  48 + });
  49 + });
  50 + })
33 ->orderBy('id', 'desc') 51 ->orderBy('id', 'desc')
34 ->paginate($size, ['*'], 'page', $page); 52 ->paginate($size, ['*'], 'page', $page);
35 return response()->json(['data' => $tickets]); 53 return response()->json(['data' => $tickets]);
@@ -1259,4 +1259,23 @@ class ProjectController extends BaseController @@ -1259,4 +1259,23 @@ class ProjectController extends BaseController
1259 NoticeLog::createLog(NoticeLog::TYPE_GENERATE_COUNT_CHARTS, ['project_id' => $this->param['project_id']]); 1259 NoticeLog::createLog(NoticeLog::TYPE_GENERATE_COUNT_CHARTS, ['project_id' => $this->param['project_id']]);
1260 $this->response('success'); 1260 $this->response('success');
1261 } 1261 }
  1262 +
  1263 + /**
  1264 + * @remark :更新项目tdk
  1265 + * @name :updateTdk
  1266 + * @author :lyh
  1267 + * @method :post
  1268 + * @time :2025/7/2 11:04
  1269 + */
  1270 + public function updateTdk(){
  1271 + $this->request->validate([
  1272 + 'project_id'=>'required',
  1273 + 'url'=>'required'
  1274 + ],[
  1275 + 'project_id.required' => '项目id不能为空',
  1276 + 'url.required' => '文件路径不为空',
  1277 + ]);
  1278 + NoticeLog::createLog(NoticeLog::TYPE_UPDATE_PROJECT_TDK, ['project_id' => $this->param['project_id'],'url'=>$this->param['url']]);
  1279 + $this->response('success',Code::SUCCESS,['url'=>$this->param['url']]);
  1280 + }
1262 } 1281 }
@@ -8,6 +8,8 @@ use App\Http\Requests\Aside\WorkOrder\AsideTicketStoreRequest; @@ -8,6 +8,8 @@ use App\Http\Requests\Aside\WorkOrder\AsideTicketStoreRequest;
8 use App\Http\Requests\Aside\WorkOrder\AsideTicketListRequest; 8 use App\Http\Requests\Aside\WorkOrder\AsideTicketListRequest;
9 use App\Http\Requests\Aside\WorkOrder\AsideTicketUpdateRequest; 9 use App\Http\Requests\Aside\WorkOrder\AsideTicketUpdateRequest;
10 use App\Http\Requests\Aside\WorkOrder\TicketProjectListRequest; 10 use App\Http\Requests\Aside\WorkOrder\TicketProjectListRequest;
  11 +use App\Models\ProjectAssociation\ProjectAssociation;
  12 +use App\Models\Workchat\MessagePush;
11 use App\Models\WorkOrder\TicketLog; 13 use App\Models\WorkOrder\TicketLog;
12 use App\Models\WorkOrder\TicketProject; 14 use App\Models\WorkOrder\TicketProject;
13 use App\Models\WorkOrder\Tickets; 15 use App\Models\WorkOrder\Tickets;
@@ -216,4 +218,40 @@ class AsideTicketController extends BaseController @@ -216,4 +218,40 @@ class AsideTicketController extends BaseController
216 { 218 {
217 // 219 //
218 } 220 }
  221 +
  222 +
  223 + /**
  224 + * 手动触发,推送工单到企微群
  225 + */
  226 + public function pushNotify($id)
  227 + {
  228 + $ticket = Tickets::find($id);
  229 + if (!$ticket) {
  230 + $this->response('工单不存在', Code::USER_MODEL_NOTFOUND_ERROE);
  231 + }
  232 +
  233 + $project = $ticket->project;
  234 + if (empty($project->association)) {
  235 + $this->response('该工单没有绑定的企微群', Code::USER_MODEL_NOTFOUND_ERROE);
  236 + }
  237 +
  238 + $message_push = new MessagePush();
  239 + $message_push->project_id = $project->table_id;
  240 + $message_push->friend_id = $project->association->friend_id;
  241 + $message_push->content_type = 'Link';
  242 + $message_push->content = json_encode([
  243 + 'title' => '工单查看 - ' . $project->company_name,
  244 + 'desc' => $ticket->title,
  245 + 'size' => 0,
  246 + 'thumbSize' => 0,
  247 + 'thumbUrl' => 'https://oa.quanqiusou.cn/logo.ico',
  248 + 'url' => 'https://oa.quanqiusou.cn/tickets?project_id='.$project->uuid
  249 + ], JSON_UNESCAPED_UNICODE);
  250 + $message_push->send_time = now();
  251 + $message_push->type = MessagePush::TYPE_TICKET;
  252 + $message_push->save();
  253 + $ticket->ding = 1; // 标记为已推送
  254 + $ticket->save();
  255 + $this->response('success', Code::SUCCESS);
  256 + }
219 } 257 }
  1 +<?php
  2 +/**
  3 + * @remark :
  4 + * @name :AuthorityScoreController.php
  5 + * @author :lyh
  6 + * @method :post
  7 + * @time :2025/7/1 11:11
  8 + */
  9 +
  10 +namespace App\Http\Controllers\Bside\BCom;
  11 +
  12 +use App\Enums\Common\Code;
  13 +use App\Http\Controllers\Bside\BaseController;
  14 +use App\Http\Logic\Bside\BCom\AuthorityScoreLogic;
  15 +use Illuminate\Http\Request;
  16 +
  17 +/**
  18 + * @remark :白帽版本报表
  19 + * @name :AuthorityScoreController
  20 + * @author :lyh
  21 + * @method :post
  22 + * @time :2025/7/1 11:12
  23 + */
  24 +class AuthorityScoreController extends BaseController
  25 +{
  26 + public function __construct(Request $request)
  27 + {
  28 + parent::__construct($request);
  29 + $this->logic = new AuthorityScoreLogic();
  30 + }
  31 +
  32 + /**
  33 + * @remark :豹猫数据统计表详情
  34 + * @name :whiteHatReportInfo
  35 + * @author :lyh
  36 + * @method :post
  37 + * @time :2025/7/1 11:13
  38 + */
  39 + public function authorityScoreInfo(){
  40 + $this->request->validate([
  41 + 'date'=>'required',
  42 + ], [
  43 + 'date.required' => '请选择报表时间',
  44 + ]);
  45 + $data = $this->logic->LogicAuthorityScoreInfo();
  46 + $this->response('success',Code::SUCCESS,$data);
  47 + }
  48 +}
@@ -304,7 +304,7 @@ class CNoticeController extends BaseController @@ -304,7 +304,7 @@ class CNoticeController extends BaseController
304 try { 304 try {
305 http_post($c_url, json_encode($c_param)); 305 http_post($c_url, json_encode($c_param));
306 }catch (\Exception $e){ 306 }catch (\Exception $e){
307 - NoticeLog::createLog(NoticeLog::GENERATE_PAGE, json_encode(['c_url'=>$c_url,'c_params'=>$c_param])); 307 + NoticeLog::createLog(NoticeLog::GENERATE_PAGE, ['c_url'=>$c_url,'c_params'=>$c_param]);
308 } 308 }
309 } 309 }
310 $this->response('更新中请稍后, 更新完成将会发送站内信通知更新结果!'); 310 $this->response('更新中请稍后, 更新完成将会发送站内信通知更新结果!');
@@ -75,6 +75,9 @@ class CustomModuleLogic extends BaseLogic @@ -75,6 +75,9 @@ class CustomModuleLogic extends BaseLogic
75 if(!isset($param['id']) || empty($param['id'])){ 75 if(!isset($param['id']) || empty($param['id'])){
76 $param['project_id'] = $this->param['project_id']; 76 $param['project_id'] = $this->param['project_id'];
77 } 77 }
  78 + if(in_array($param['route'],['blogs','news','top_blog','blog','product','products'])){
  79 + $this->fail('不允许使用项目默认模块路由');
  80 + }
78 return $this->success($param); 81 return $this->success($param);
79 } 82 }
80 83
  1 +<?php
  2 +/**
  3 + * @remark :
  4 + * @name :AuthorityScoreLogic.php
  5 + * @author :lyh
  6 + * @method :post
  7 + * @time :2025/7/1 11:15
  8 + */
  9 +
  10 +namespace App\Http\Logic\Bside\BCom;
  11 +
  12 +use App\Http\Logic\Bside\BaseLogic;
  13 +use App\Models\Ai\AiBlog;
  14 +use App\Models\Ai\AiVideo;
  15 +use App\Models\AuthorityScore\AuthorityScore;
  16 +use App\Models\RankData\RankDataBmseo;
  17 +use App\Models\SeoSetting\LinkData;
  18 +
  19 +/**
  20 + * @remark :白帽seo报表详情数据(权威评分)
  21 + * @name :AuthorityScoreLogic
  22 + * @author :lyh
  23 + * @method :post
  24 + * @time :2025/7/1 11:15
  25 + */
  26 +class AuthorityScoreLogic extends BaseLogic
  27 +{
  28 + public function __construct()
  29 + {
  30 + parent::__construct();
  31 + $this->param = $this->requestAll;
  32 + }
  33 +
  34 + /**
  35 + * @remark :获取当前项目日期的报表
  36 + * @name :LogicWhiteHatReportInfo
  37 + * @author :lyh
  38 + * @method :post
  39 + * @time :2025/7/1 11:43
  40 + */
  41 + public function LogicAuthorityScoreInfo(){
  42 + $data = [];
  43 + $bSeoModel = new RankDataBmseo();
  44 + $bSeoInfo = $bSeoModel->read(['project_id'=>$this->user['project_id']],['updated_date','first_num','first_page_num','first_three_pages_num','first_five_pages_num','first_ten_pages_num']);
  45 + $data['rank'] = $bSeoInfo;
  46 + $authorityScoreModel = new AuthorityScore();
  47 + $data['authority_score'] = $authorityScoreModel->list(['project_id'=>$this->user['project_id']],'id',['*'],'desc',10);
  48 + $startTime = date('Y-m-01 00:00:00', strtotime($this->param['date']));
  49 + // 结束时间(当月最后一天)
  50 + $endTime = date('Y-m-t 23:59:59', strtotime($this->param['date']));
  51 + //当月ai_blog发布数量及链接
  52 + $aiBlogModel = new AiBlog();
  53 + $data['ai_blog']['count'] = $aiBlogModel->counts(['created_at'=>['between',[$startTime,$endTime]]]);
  54 + $aiRouteArr = $aiBlogModel->selectField(['created_at'=>['between',[$startTime,$endTime]]],'route');
  55 + if(!empty($aiRouteArr)){
  56 + foreach ($aiRouteArr as $k => $item){
  57 + $aiRouteArr[$k] = $this->user['domain'] . 'blog/' . $item;
  58 + }
  59 + }
  60 + $data['ai_blog']['link'] = $aiRouteArr;
  61 + //当月ai_video发布数量及链接
  62 + $aiVideoModel = new AiVideo();
  63 + $data['ai_video']['count'] =$aiVideoModel->counts(['created_at'=>['between',[$startTime,$endTime]]]);
  64 + $aiVideoRouteArr = $aiVideoModel->selectField(['created_at'=>['between',[$startTime,$endTime]]],'route');
  65 + if(!empty($aiVideoRouteArr)){
  66 + foreach ($aiVideoRouteArr as $kVideo => $itemVideo){
  67 + $aiVideoRouteArr[$kVideo] = $this->user['domain'] . 'video/' . $itemVideo;
  68 + }
  69 + }
  70 + $data['ai_video']['link'] = $aiVideoRouteArr;
  71 + //白帽关键字
  72 + $data['keyword']['count'] = 0;
  73 + $data['keyword']['link'] = [];
  74 + //外链发布条数
  75 + $linkDataModel = new LinkData();
  76 + $data['link_data']['count'] = $linkDataModel->counts(['send_time'=>['between',[$startTime,$endTime]]]);
  77 + $data['link_data']['total_count'] = $linkDataModel->count();
  78 + $data['link_data']['ten_count'] = $linkDataModel->counts(['da_values'=>['between',[10,30]]]);
  79 + $data['link_data']['thirty_count'] = $linkDataModel->counts(['da_values'=>['between',[30,50]]]);
  80 + $data['link_data']['fifty_count'] = $linkDataModel->counts(['da_values'=>['>=',50]]);
  81 + return $this->success($data);
  82 + }
  83 +}
  1 +<?php
  2 +
  3 +namespace App\Http\Requests\Api\WorkOrder;
  4 +
  5 +use Illuminate\Foundation\Http\FormRequest;
  6 +
  7 +class TicketListRequest extends FormRequest
  8 +{
  9 + /**
  10 + * Determine if the user is authorized to make this request.
  11 + *
  12 + * @return bool
  13 + */
  14 + public function authorize()
  15 + {
  16 + return true;
  17 + }
  18 +
  19 + /**
  20 + * Get the validation rules that apply to the request.
  21 + *
  22 + * @return array
  23 + */
  24 + public function rules()
  25 + {
  26 + return [
  27 + 'status' => 'nullable|in:0,1,2,3|integer',
  28 + 'search' => 'nullable|string', // 搜索关键词
  29 + 'page' => 'nullable|integer',
  30 + 'size' => 'nullable|integer',
  31 + ];
  32 + }
  33 +}
  1 +<?php
  2 +/**
  3 + * @remark :
  4 + * @name :AuthorityScore.php
  5 + * @author :lyh
  6 + * @method :post
  7 + * @time :2025/7/1 17:37
  8 + */
  9 +
  10 +namespace App\Models\AuthorityScore;
  11 +
  12 +use App\Models\Base;
  13 +
  14 +/**
  15 + * @remark :白帽第三方拉取排名数据
  16 + * @name :AuthorityScore
  17 + * @author :lyh
  18 + * @method :post
  19 + * @time :2025/7/1 17:38
  20 + */
  21 +class AuthorityScore extends Base
  22 +{
  23 + protected $table = 'gl_authority_score';
  24 +}
@@ -3,6 +3,8 @@ @@ -3,6 +3,8 @@
3 namespace App\Models\AutoPull; 3 namespace App\Models\AutoPull;
4 4
5 use App\Models\Base; 5 use App\Models\Base;
  6 +use App\Models\Devops\ServerConfig;
  7 +use App\Models\Devops\Servers;
6 8
7 class AutoPullNotify extends Base 9 class AutoPullNotify extends Base
8 { 10 {
@@ -10,24 +12,7 @@ class AutoPullNotify extends Base @@ -10,24 +12,7 @@ class AutoPullNotify extends Base
10 12
11 public static function serversMap() 13 public static function serversMap()
12 { 14 {
13 - return [  
14 - 1 => '硅谷云服务器',  
15 - 25 => '硅谷建站服务器02',  
16 - 15 => '硅谷IDC服务器01(6.0美服1)',  
17 - 14 => '硅谷IDC服务器02(6.0美服2)',  
18 - 21 => '硅谷IDC服务器03(6.0美服3)',  
19 - 2 => '俄罗斯服务器',  
20 - 12 => '俄罗斯IDC服务器01',  
21 - 4 => '阿里云深圳服务器',  
22 - 5 => '日本服务器',  
23 - 8 => '香港服务器',  
24 - 17 => '解析IP专用服务器',  
25 - 22 => '白帽专属服务器01',  
26 - 24 => '白帽专属服务器02',  
27 - 23 => '西班牙服务器',  
28 - 6 => '自建站服务器群',  
29 - 27 => '硅谷建站服务器01',  
30 - ]; 15 + return Servers::where('status', 0)->where('id', '!=', ServerConfig::SELF_TEST_ID)->pluck('server_name', 'id')->toArray();
31 } 16 }
32 17
33 public static function processMap() 18 public static function processMap()
@@ -15,6 +15,7 @@ class NoticeLog extends Base @@ -15,6 +15,7 @@ class NoticeLog extends Base
15 const TYPE_INIT_PROJECT = 'init_project'; 15 const TYPE_INIT_PROJECT = 'init_project';
16 const TYPE_INIT_KEYWORD_COMMENT = 'init_keyword_comment';//聚合页关键词评论 16 const TYPE_INIT_KEYWORD_COMMENT = 'init_keyword_comment';//聚合页关键词评论
17 const TYPE_GENERATE_COUNT_CHARTS = 'generate_count_charts';//聚合页关键字图表生成 17 const TYPE_GENERATE_COUNT_CHARTS = 'generate_count_charts';//聚合页关键字图表生成
  18 + const TYPE_UPDATE_PROJECT_TDK = 'updated_project_tdk';//根据路由更新tdk
18 const TYPE_COPY_PROJECT = 'copy_project'; 19 const TYPE_COPY_PROJECT = 'copy_project';
19 const TYPE_INIT_KEYWORD = 'init_keyword'; 20 const TYPE_INIT_KEYWORD = 'init_keyword';
20 const DELETE_PRODUCT_CATEGORY = 'delete_product_category'; 21 const DELETE_PRODUCT_CATEGORY = 'delete_product_category';
@@ -20,7 +20,7 @@ class TicketLog extends Base @@ -20,7 +20,7 @@ class TicketLog extends Base
20 public function engineer() 20 public function engineer()
21 { 21 {
22 return $this->belongsTo(Manage::class, 'engineer_id', 'id') 22 return $this->belongsTo(Manage::class, 'engineer_id', 'id')
23 - ->select(['id', 'name']); 23 + ->select(['id', 'name', 'mobile']);
24 } 24 }
25 25
26 public function ticket() 26 public function ticket()
@@ -5,6 +5,7 @@ namespace App\Models\WorkOrder; @@ -5,6 +5,7 @@ namespace App\Models\WorkOrder;
5 use App\Models\Base; 5 use App\Models\Base;
6 use App\Models\Manage\Manage; 6 use App\Models\Manage\Manage;
7 use App\Models\Project\Project; 7 use App\Models\Project\Project;
  8 +use App\Models\ProjectAssociation\ProjectAssociation;
8 use Illuminate\Database\Eloquent\Factories\HasFactory; 9 use Illuminate\Database\Eloquent\Factories\HasFactory;
9 10
10 class TicketProject extends Base 11 class TicketProject extends Base
@@ -41,4 +42,15 @@ class TicketProject extends Base @@ -41,4 +42,15 @@ class TicketProject extends Base
41 return $this->hasOne(Manage::class, 'id', 'engineer_id') 42 return $this->hasOne(Manage::class, 'id', 'engineer_id')
42 ->select(['id', 'name']); 43 ->select(['id', 'name']);
43 } 44 }
  45 +
  46 + /**
  47 + * 绑定的企微群
  48 + */
  49 + public function association()
  50 + {
  51 + return $this->hasOne(ProjectAssociation::class, 'project_id', 'table_id')
  52 + ->where('status', 1)
  53 + ->where('binding_app', ProjectAssociation::ENTERPRISE_WECHAT)
  54 + ->select(['id', 'project_id', 'friend_id', 'binding_app']);
  55 + }
44 } 56 }
@@ -204,6 +204,7 @@ Route::middleware(['aloginauth'])->group(function () { @@ -204,6 +204,7 @@ Route::middleware(['aloginauth'])->group(function () {
204 Route::any('/updateProjectManager', [Aside\Project\ProjectController::class, 'updateProjectManager'])->name('admin.project_updateProjectManager');//更改项目人员配置 204 Route::any('/updateProjectManager', [Aside\Project\ProjectController::class, 'updateProjectManager'])->name('admin.project_updateProjectManager');//更改项目人员配置
205 Route::any('/setIsParticiple', [Aside\Project\ProjectController::class, 'setIsParticiple'])->name('admin.project_setIsParticiple');//开启/关闭分词 205 Route::any('/setIsParticiple', [Aside\Project\ProjectController::class, 'setIsParticiple'])->name('admin.project_setIsParticiple');//开启/关闭分词
206 Route::any('/saveSiteStatus', [Aside\Project\ProjectController::class, 'saveSiteStatus'])->name('admin.project_saveSiteStatus'); 206 Route::any('/saveSiteStatus', [Aside\Project\ProjectController::class, 'saveSiteStatus'])->name('admin.project_saveSiteStatus');
  207 + Route::any('/updateTdk', [Aside\Project\ProjectController::class, 'updateTdk'])->name('admin.project_updateTdk');//更新项目tdk
207 //获取关键词前缀和后缀 208 //获取关键词前缀和后缀
208 Route::prefix('keyword')->group(function () { 209 Route::prefix('keyword')->group(function () {
209 Route::any('/getKeywordPrefix', [Aside\Project\KeywordPrefixController::class, 'getKeywordPrefix'])->name('admin.keyword_getKeywordPrefix'); 210 Route::any('/getKeywordPrefix', [Aside\Project\KeywordPrefixController::class, 'getKeywordPrefix'])->name('admin.keyword_getKeywordPrefix');
@@ -254,6 +255,7 @@ Route::middleware(['aloginauth'])->group(function () { @@ -254,6 +255,7 @@ Route::middleware(['aloginauth'])->group(function () {
254 Route::post('/', [Aside\WorkOrder\AsideTicketController::class, 'store'])->name('admin.tickets.store')->summary('A端创建工单'); 255 Route::post('/', [Aside\WorkOrder\AsideTicketController::class, 'store'])->name('admin.tickets.store')->summary('A端创建工单');
255 Route::get('/{id}', [Aside\WorkOrder\AsideTicketController::class, 'show'])->name('admin.tickets.show')->summary('A端工单详情'); 256 Route::get('/{id}', [Aside\WorkOrder\AsideTicketController::class, 'show'])->name('admin.tickets.show')->summary('A端工单详情');
256 Route::post('/{id}', [Aside\WorkOrder\AsideTicketController::class, 'update'])->name('admin.tickets.update')->summary('A端更新工单,审核,邀请同事'); 257 Route::post('/{id}', [Aside\WorkOrder\AsideTicketController::class, 'update'])->name('admin.tickets.update')->summary('A端更新工单,审核,邀请同事');
  258 + Route::get('/pushNotify/{ticket_id}', [Aside\WorkOrder\AsideTicketController::class, 'pushNotify'])->name('admin.tickets.pushNotify')->summary('A端工单推送企微群');
257 Route::get('/projects/{search}', [Aside\WorkOrder\AsideTicketController::class, 'getProjects'])->name('admin.tickets.projects')->summary('A端V5V6项目列表'); 259 Route::get('/projects/{search}', [Aside\WorkOrder\AsideTicketController::class, 'getProjects'])->name('admin.tickets.projects')->summary('A端V5V6项目列表');
258 Route::get('/v56_projects/list', [Aside\WorkOrder\AsideTicketController::class, 'projectList'])->name('admin.tickets.projectList')->summary('A端V5V6项目列表'); 260 Route::get('/v56_projects/list', [Aside\WorkOrder\AsideTicketController::class, 'projectList'])->name('admin.tickets.projectList')->summary('A端V5V6项目列表');
259 Route::post('/log/{id}', [Aside\WorkOrder\AsideTicketLogController::class, 'update'])->name('admin.tickets.log.update')->summary('A端工单操作日志更新,完成工单'); 261 Route::post('/log/{id}', [Aside\WorkOrder\AsideTicketLogController::class, 'update'])->name('admin.tickets.log.update')->summary('A端工单操作日志更新,完成工单');
@@ -744,6 +744,10 @@ Route::middleware(['bloginauth'])->group(function () { @@ -744,6 +744,10 @@ Route::middleware(['bloginauth'])->group(function () {
744 Route::prefix('google_link')->group(function () { 744 Route::prefix('google_link')->group(function () {
745 Route::any('/', [\App\Http\Controllers\Bside\GoogleKeyword\GoogleLinkController::class,'getLink'])->name('google_link_getLink'); 745 Route::any('/', [\App\Http\Controllers\Bside\GoogleKeyword\GoogleLinkController::class,'getLink'])->name('google_link_getLink');
746 }); 746 });
  747 + //白帽版本统计(SEMRUSH得分)
  748 + Route::prefix('authority_score')->group(function () {
  749 + Route::any('/authorityScoreInfo', [\App\Http\Controllers\Bside\BCom\AuthorityScoreController::class,'AuthorityScoreInfo'])->name('authority_score_AuthorityScoreInfo');
  750 + });
747 }); 751 });
748 //无需登录验证的路由组 752 //无需登录验证的路由组
749 Route::group([], function () { 753 Route::group([], function () {