|
...
|
...
|
@@ -64,8 +64,6 @@ class UpdateRoute extends Command |
|
|
|
echo date('Y-m-d H:i:s') . 'project_id:'.$v['id'] . PHP_EOL;
|
|
|
|
ProjectServer::useProject($v['id']);
|
|
|
|
$this->ceshi();
|
|
|
|
sleep(5);
|
|
|
|
$this->getBlog();
|
|
|
|
DB::disconnect('custom_mysql');
|
|
|
|
}
|
|
|
|
echo date('Y-m-d H:i:s') . 'end' . PHP_EOL;
|
|
...
|
...
|
@@ -74,10 +72,15 @@ class UpdateRoute extends Command |
|
|
|
public function ceshi()
|
|
|
|
{
|
|
|
|
$customModel = new CustomModuleContent();
|
|
|
|
$lists = $customModel->list(['module_id' => 8], 'id', ['id']);
|
|
|
|
$lists = $customModel->list(['module_id' => 8], 'id', ['id','name']);
|
|
|
|
foreach ($lists as $v) {
|
|
|
|
$routeMapModel = new RouteMap();
|
|
|
|
$routeMapModel->del(['source' => 'module', 'source_id' => $v['id']]);
|
|
|
|
$blogModel = new Blog();
|
|
|
|
$info = $blogModel->read(['name'=>$v['name']],['id']);
|
|
|
|
if($info !== false){
|
|
|
|
$templateModel = new BTemplate();
|
|
|
|
$condition = ['source'=>8,'source_id'=>$v['id'],'is_custom'=>1,'is_list'=>0];
|
|
|
|
$templateModel->edit(['source'=>$templateModel::SOURCE_BLOG,'source_id'=>$info['id'],'is_custom'=>0],$condition);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
...
|
...
|
|