|
...
|
...
|
@@ -23,6 +23,7 @@ use App\Models\Project\Project; |
|
|
|
use App\Models\Project\ProjectAiSetting;
|
|
|
|
use App\Models\Project\ProjectWhiteHatAffix;
|
|
|
|
use App\Models\RouteMap\RouteMap;
|
|
|
|
use App\Models\SeoSetting\LinkData;
|
|
|
|
use App\Models\Template\BTemplateMain;
|
|
|
|
use App\Models\Template\TemplateTypeMain;
|
|
|
|
use App\Models\WebSetting\Translate;
|
|
...
|
...
|
@@ -115,13 +116,23 @@ class lyhDemo extends Command |
|
|
|
public function _actionRoute(){
|
|
|
|
$projectModel = new Project();
|
|
|
|
$lists = $projectModel->list(['type'=>['in',[1,2,3,4,6]]], 'id', ['id']);
|
|
|
|
$data = [];
|
|
|
|
$geoLinkModel = new GeoLink();
|
|
|
|
foreach ($lists as $item){
|
|
|
|
echo date('Y-m-d H:i:s') . '开始--项目的id:'. $item['id'] . PHP_EOL;
|
|
|
|
$letters = range('A', 'X'); // 只取前 24 个字母(A ~ X)
|
|
|
|
$randomLetter = $letters[array_rand($letters)];
|
|
|
|
$data['post_id'] = $randomLetter.mt_rand(100000, 999999).$item['id'];
|
|
|
|
$projectModel->edit(['post_id'=>$data['post_id']],['id'=>$item['id']]);
|
|
|
|
ProjectServer::useProject($item['project_id']);
|
|
|
|
$linkDataModel = new LinkData();
|
|
|
|
$linkList = $linkDataModel->list();
|
|
|
|
foreach ($linkList as $link){
|
|
|
|
$geoLinkModel->add([
|
|
|
|
'project_id'=>$item['id'],
|
|
|
|
'url'=>$link['url'],
|
|
|
|
'type'=>2,
|
|
|
|
'da'=>$link['da_values'],
|
|
|
|
'send_time'=>$link['send_time'],
|
|
|
|
'time'=>$link['time'],
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
DB::disconnect('custom_mysql');
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
...
|
...
|
|