作者 刘锟

Merge remote-tracking branch 'origin/master' into akun

@@ -45,7 +45,8 @@ class RemainDay extends Command @@ -45,7 +45,8 @@ class RemainDay extends Command
45 2250, 45 2250,
46 2193, 46 2193,
47 2399, 47 2399,
48 - 1685 48 + 1685,
  49 + 3309
49 ];//需要单独处理的项目 50 ];//需要单独处理的项目
50 /** 51 /**
51 * The console command description. 52 * The console command description.
@@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
9 9
10 namespace App\Console\Commands\Geo; 10 namespace App\Console\Commands\Geo;
11 11
  12 +use App\Helper\Translate;
12 use App\Models\Geo\GeoPlatform; 13 use App\Models\Geo\GeoPlatform;
13 use App\Models\Geo\GeoQuestion; 14 use App\Models\Geo\GeoQuestion;
14 use App\Models\Geo\GeoQuestionLog; 15 use App\Models\Geo\GeoQuestionLog;
@@ -75,6 +76,7 @@ class GeoQuestionRes extends Command @@ -75,6 +76,7 @@ class GeoQuestionRes extends Command
75 $geoResultModel = new GeoQuestionResult(); 76 $geoResultModel = new GeoQuestionResult();
76 $geoLogModel = new GeoQuestionLog(); 77 $geoLogModel = new GeoQuestionLog();
77 foreach ($taskInfo['question'] as $question) { 78 foreach ($taskInfo['question'] as $question) {
  79 + $en_question = Translate::tran($question, 'zh') ?? '';
78 foreach ($platformsArr as $platform) { 80 foreach ($platformsArr as $platform) {
79 $data = $hit_data = []; 81 $data = $hit_data = [];
80 $error_num = 0; 82 $error_num = 0;
@@ -83,7 +85,7 @@ class GeoQuestionRes extends Command @@ -83,7 +85,7 @@ class GeoQuestionRes extends Command
83 $error_num++; 85 $error_num++;
84 try { 86 try {
85 echo '执行次数:'.$error_num.PHP_EOL; 87 echo '执行次数:'.$error_num.PHP_EOL;
86 - if ($error_num >= 5) { 88 + if ($error_num >= 3) {
87 continue; 89 continue;
88 } 90 }
89 echo '执行平台:'.$platform.PHP_EOL; 91 echo '执行平台:'.$platform.PHP_EOL;
@@ -132,6 +134,7 @@ class GeoQuestionRes extends Command @@ -132,6 +134,7 @@ class GeoQuestionRes extends Command
132 'type' => $taskInfo['type'] ?? $geoQuestionModel::TYPE_BRAND, 134 'type' => $taskInfo['type'] ?? $geoQuestionModel::TYPE_BRAND,
133 'platform' => $platform, 135 'platform' => $platform,
134 'question' => $question, 136 'question' => $question,
  137 + 'en_question'=> $en_question,
135 'keywords' => json_encode($hit_keyword,true),//命中的关键词 138 'keywords' => json_encode($hit_keyword,true),//命中的关键词
136 'url' => json_encode($hit_url,true),//命中的网址 139 'url' => json_encode($hit_url,true),//命中的网址
137 'text' => json_encode($result,true), 140 'text' => json_encode($result,true),
@@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
9 9
10 namespace App\Console\Commands\Sync; 10 namespace App\Console\Commands\Sync;
11 11
  12 +use App\Models\Manage\Manage;
12 use App\Models\Manage\Mobile; 13 use App\Models\Manage\Mobile;
13 use App\Models\User\User; 14 use App\Models\User\User;
14 use Illuminate\Console\Command; 15 use Illuminate\Console\Command;
@@ -60,7 +61,7 @@ class SyncMobile extends Command @@ -60,7 +61,7 @@ class SyncMobile extends Command
60 ]; 61 ];
61 $mobileModel->insert($param); 62 $mobileModel->insert($param);
62 //查看当前用户是否存在 63 //查看当前用户是否存在
63 - $info = $userModel->read(['mobile'=>$mobile,'project_id'=>1]); 64 + $info = $userModel->read(['mobile'=>$mobile,'project_id'=>1],['id']);
64 if($info === false){ 65 if($info === false){
65 $data = [ 66 $data = [
66 'mobile'=>$mobile, 67 'mobile'=>$mobile,
@@ -73,6 +74,9 @@ class SyncMobile extends Command @@ -73,6 +74,9 @@ class SyncMobile extends Command
73 } 74 }
74 } 75 }
75 $data[] = '13083988828'; 76 $data[] = '13083988828';
  77 + $managerModel = new Manage();
  78 + $mobileArr = $managerModel->selectField(['status'=>1],'mobile');
  79 + $data = array_values(array_unique(array_merge($data,$mobileArr)));
76 $userModel->edit(['status'=>1],['project_id'=>1,'mobile'=>['not in',$data]]); 80 $userModel->edit(['status'=>1],['project_id'=>1,'mobile'=>['not in',$data]]);
77 $userModel->edit(['status'=>0],['project_id'=>1,'mobile'=>['in',$data]]); 81 $userModel->edit(['status'=>0],['project_id'=>1,'mobile'=>['in',$data]]);
78 } 82 }
@@ -43,7 +43,7 @@ class GeoQuestionResLogic extends BaseLogic @@ -43,7 +43,7 @@ class GeoQuestionResLogic extends BaseLogic
43 * @time :2025/7/4 9:48 43 * @time :2025/7/4 9:48
44 */ 44 */
45 public function getResultList($map = [],$page = 1,$row = 20){ 45 public function getResultList($map = [],$page = 1,$row = 20){
46 - $filed = ['id','project_id','question_id','platform','question','keywords','url','created_at','updated_at']; 46 + $filed = ['id','project_id','question_id','platform','question','en_question','keywords','url','created_at','updated_at'];
47 $query = $this->model->formatQuery($map); 47 $query = $this->model->formatQuery($map);
48 $query = $query->where(function ($q) { 48 $query = $query->where(function ($q) {
49 $q->whereRaw('JSON_LENGTH(keywords) > 0') 49 $q->whereRaw('JSON_LENGTH(keywords) > 0')
@@ -554,7 +554,7 @@ class RankDataLogic extends BaseLogic @@ -554,7 +554,7 @@ class RankDataLogic extends BaseLogic
554 $without_extension_project_ids = [658]; //是否达标只统计主词的 554 $without_extension_project_ids = [658]; //是否达标只统计主词的
555 $extension_project_ids = [354]; //扩展词也到达标的 555 $extension_project_ids = [354]; //扩展词也到达标的
556 $compliance_project_ids = [2163,257,823,1750,497]; //直接达标处理的 556 $compliance_project_ids = [2163,257,823,1750,497]; //直接达标处理的
557 - $ceaseProjectId = [354, 378, 649, 1226, 1283, 1703, 1893, 2066, 2250,2193,2399,1685];//暂停的项目 557 + $ceaseProjectId = [354, 378, 649, 1226, 1283, 1703, 1893, 2066, 2250,2193,2399,1685,3309];//暂停的项目
558 $uptimeProjectId = [1434,1812,276,2414,2974];//按上线时间统计的项目 558 $uptimeProjectId = [1434,1812,276,2414,2974];//按上线时间统计的项目
559 //一个项目多个api_no 559 //一个项目多个api_no
560 $multiple_api_no_project_ids = [ 560 $multiple_api_no_project_ids = [
@@ -138,7 +138,8 @@ class Project extends Base @@ -138,7 +138,8 @@ class Project extends Base
138 public static function seoMap() 138 public static function seoMap()
139 { 139 {
140 return [ 140 return [
141 - 1 => '白帽SEO方案' 141 + 1 => 'GEO标准版',
  142 + 2 => 'GEO商务版'
142 ]; 143 ];
143 } 144 }
144 /** 145 /**