|
...
|
...
|
@@ -66,10 +66,11 @@ class UpdateRoute extends Command |
|
|
|
foreach ($lists as $v){
|
|
|
|
echo date('Y-m-d H:i:s') . '执行项目的project_id:'.$v['id'] . PHP_EOL;
|
|
|
|
ProjectServer::useProject($v['id']);
|
|
|
|
$this->updateSeo($v['id']);
|
|
|
|
$this->updateSeo();
|
|
|
|
DB::disconnect('custom_mysql');
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// $this->updateProjectOp();
|
|
|
|
// $projectModel = new Project();
|
|
|
|
// $lists = $projectModel->list(['delete_status'=>0],'id',['id']);
|
|
...
|
...
|
@@ -526,22 +527,9 @@ class UpdateRoute extends Command |
|
|
|
* @method :post
|
|
|
|
* @time :2025/3/14 14:39
|
|
|
|
*/
|
|
|
|
public function updateSeo($project_id){
|
|
|
|
$seoModel = new WebSettingSeo();
|
|
|
|
$seo_info = $seoModel->read(['project_id'=>$project_id]);
|
|
|
|
if($seo_info !== false){
|
|
|
|
$prefix = [];
|
|
|
|
$suffix = [];
|
|
|
|
if(!empty($seo_info['product_cate_prefix'])){
|
|
|
|
$prefix[] = ['val'=>[$seo_info['product_cate_prefix']],'level'=>1];
|
|
|
|
}
|
|
|
|
if(!empty($seo_info['product_cate_suffix'])){
|
|
|
|
$suffix[] = ['val'=>[$seo_info['product_cate_suffix']],'level'=>1];
|
|
|
|
}
|
|
|
|
if(!empty($prefix) && !empty($suffix)){
|
|
|
|
$seoModel->edit(['product_category_prefix'=>json_encode($prefix,true),'product_category_suffix'=>json_encode($suffix,true)],['project_id'=>$project_id]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
public function updateSeo(){
|
|
|
|
$contentModel = new CustomModuleContent();
|
|
|
|
$contentModel->edit(['seo_title'=>''],['id'=>['!=',0]]);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|