作者 lyh

gx脚本

@@ -61,15 +61,14 @@ class Demo extends Command @@ -61,15 +61,14 @@ class Demo extends Command
61 protected $description = 'demo'; 61 protected $description = 'demo';
62 62
63 public function handle(){ 63 public function handle(){
64 -// $projectModel = new Project();  
65 -// $list = $projectModel->list(['id'=>1659]);  
66 -// foreach ($list as $v){  
67 -// echo date('Y-m-d H:i:s') . 'project_id:'.$v['id'] . PHP_EOL;  
68 -// ProjectServer::useProject($v['id']);  
69 -// $this->getProduct();  
70 -// DB::disconnect('custom_mysql');  
71 -// }  
72 - return $this->savePurchaserInfo(); 64 + $projectModel = new Project();
  65 + $list = $projectModel->list(['id'=>1697]);
  66 + foreach ($list as $v){
  67 + echo date('Y-m-d H:i:s') . 'project_id:'.$v['id'] . PHP_EOL;
  68 + ProjectServer::useProject($v['id']);
  69 + $this->getProduct();
  70 + DB::disconnect('custom_mysql');
  71 + }
73 echo date('Y-m-d H:i:s') . 'end' . PHP_EOL; 72 echo date('Y-m-d H:i:s') . 'end' . PHP_EOL;
74 } 73 }
75 74
@@ -12,6 +12,7 @@ namespace App\Console\Commands\Update; @@ -12,6 +12,7 @@ namespace App\Console\Commands\Update;
12 use App\Models\Domain\DomainInfo; 12 use App\Models\Domain\DomainInfo;
13 use App\Models\Product\Keyword; 13 use App\Models\Product\Keyword;
14 use App\Models\Product\KeywordPage; 14 use App\Models\Product\KeywordPage;
  15 +use App\Models\Product\Product;
15 use App\Services\ProjectServer; 16 use App\Services\ProjectServer;
16 use Illuminate\Console\Command; 17 use Illuminate\Console\Command;
17 use Illuminate\Support\Facades\DB; 18 use Illuminate\Support\Facades\DB;
@@ -106,4 +107,19 @@ class UpdateKeyword extends Command @@ -106,4 +107,19 @@ class UpdateKeyword extends Command
106 shell_exec('curl -k "'.$url.'"'); 107 shell_exec('curl -k "'.$url.'"');
107 return true; 108 return true;
108 } 109 }
  110 +
  111 + /**
  112 + * @remark :更新产品关键词
  113 + * @name :updatedProductKeyword
  114 + * @author :lyh
  115 + * @method :post
  116 + * @time :2024/11/27 14:26
  117 + */
  118 + public function updatedProductKeyword(){
  119 + $productModel = new Product();
  120 + $lists = $productModel->list();
  121 + foreach ($lists as $k => $v){
  122 +
  123 + }
  124 + }
109 } 125 }