|
@@ -65,8 +65,24 @@ class UpdateRoute extends Command |
|
@@ -65,8 +65,24 @@ class UpdateRoute extends Command |
|
65
|
ProjectServer::useProject($v['id']);
|
65
|
ProjectServer::useProject($v['id']);
|
|
66
|
$webSettingModel = new WebSetting();
|
66
|
$webSettingModel = new WebSetting();
|
|
67
|
$settingInfo = $webSettingModel->read(['project_id'=>$v['id']]);
|
67
|
$settingInfo = $webSettingModel->read(['project_id'=>$v['id']]);
|
|
68
|
- if($settingInfo !== false && ($settingInfo['anchor_num'] > 3)){
|
|
|
|
69
|
- $webSettingModel->edit(['anchor_num'=>3],['project_id'=>$v['id']]);
|
68
|
+ if($settingInfo === false){
|
|
|
|
69
|
+ echo date('Y-m-d H:i:s') . '当前项目的设置数据不存在:'.$v['id'] . PHP_EOL;
|
|
|
|
70
|
+ continue;
|
|
|
|
71
|
+ }
|
|
|
|
72
|
+ if($settingInfo !== false){
|
|
|
|
73
|
+ if($settingInfo['anchor_page_num'] == 0){
|
|
|
|
74
|
+ $settingInfo['anchor_page_num'] = 1;
|
|
|
|
75
|
+ }
|
|
|
|
76
|
+ if(empty($settingInfo['anchor_setting'])){
|
|
|
|
77
|
+ $settingInfo['anchor_setting'] = ["3","4","5"];
|
|
|
|
78
|
+ }
|
|
|
|
79
|
+ $data = [
|
|
|
|
80
|
+ 'anchor_setting'=>$settingInfo['anchor_setting'],
|
|
|
|
81
|
+ 'anchor_is_enable'=>1,
|
|
|
|
82
|
+ 'anchor_page_num'=>$settingInfo['anchor_page_num'],
|
|
|
|
83
|
+ 'anchor_keyword_is_enable'=>1
|
|
|
|
84
|
+ ];
|
|
|
|
85
|
+ $webSettingModel->edit($data,['project_id'=>$v['id']]);
|
|
70
|
}
|
86
|
}
|
|
71
|
DB::disconnect('custom_mysql');
|
87
|
DB::disconnect('custom_mysql');
|
|
72
|
}
|
88
|
}
|