作者 lyh

gx脚本

... ... @@ -61,15 +61,14 @@ class Demo extends Command
protected $description = 'demo';
public function handle(){
// $projectModel = new Project();
// $list = $projectModel->list(['id'=>1659]);
// foreach ($list as $v){
// echo date('Y-m-d H:i:s') . 'project_id:'.$v['id'] . PHP_EOL;
// ProjectServer::useProject($v['id']);
// $this->getProduct();
// DB::disconnect('custom_mysql');
// }
return $this->savePurchaserInfo();
$projectModel = new Project();
$list = $projectModel->list(['id'=>1697]);
foreach ($list as $v){
echo date('Y-m-d H:i:s') . 'project_id:'.$v['id'] . PHP_EOL;
ProjectServer::useProject($v['id']);
$this->getProduct();
DB::disconnect('custom_mysql');
}
echo date('Y-m-d H:i:s') . 'end' . PHP_EOL;
}
... ...
... ... @@ -12,6 +12,7 @@ namespace App\Console\Commands\Update;
use App\Models\Domain\DomainInfo;
use App\Models\Product\Keyword;
use App\Models\Product\KeywordPage;
use App\Models\Product\Product;
use App\Services\ProjectServer;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
... ... @@ -106,4 +107,19 @@ class UpdateKeyword extends Command
shell_exec('curl -k "'.$url.'"');
return true;
}
/**
* @remark :更新产品关键词
* @name :updatedProductKeyword
* @author :lyh
* @method :post
* @time :2024/11/27 14:26
*/
public function updatedProductKeyword(){
$productModel = new Product();
$lists = $productModel->list();
foreach ($lists as $k => $v){
}
}
}
... ...