|
...
|
...
|
@@ -65,8 +65,24 @@ class UpdateRoute extends Command |
|
|
|
ProjectServer::useProject($v['id']);
|
|
|
|
$webSettingModel = new WebSetting();
|
|
|
|
$settingInfo = $webSettingModel->read(['project_id'=>$v['id']]);
|
|
|
|
if($settingInfo !== false && ($settingInfo['anchor_num'] > 3)){
|
|
|
|
$webSettingModel->edit(['anchor_num'=>3],['project_id'=>$v['id']]);
|
|
|
|
if($settingInfo === false){
|
|
|
|
echo date('Y-m-d H:i:s') . '当前项目的设置数据不存在:'.$v['id'] . PHP_EOL;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
if($settingInfo !== false){
|
|
|
|
if($settingInfo['anchor_page_num'] == 0){
|
|
|
|
$settingInfo['anchor_page_num'] = 1;
|
|
|
|
}
|
|
|
|
if(empty($settingInfo['anchor_setting'])){
|
|
|
|
$settingInfo['anchor_setting'] = ["3","4","5"];
|
|
|
|
}
|
|
|
|
$data = [
|
|
|
|
'anchor_setting'=>$settingInfo['anchor_setting'],
|
|
|
|
'anchor_is_enable'=>1,
|
|
|
|
'anchor_page_num'=>$settingInfo['anchor_page_num'],
|
|
|
|
'anchor_keyword_is_enable'=>1
|
|
|
|
];
|
|
|
|
$webSettingModel->edit($data,['project_id'=>$v['id']]);
|
|
|
|
}
|
|
|
|
DB::disconnect('custom_mysql');
|
|
|
|
}
|
...
|
...
|
|