|
...
|
...
|
@@ -67,22 +67,16 @@ class UpdateRoute extends Command |
|
|
|
$settingInfo = $webSettingModel->read(['project_id'=>$v['id']]);
|
|
|
|
if($settingInfo === false){
|
|
|
|
echo date('Y-m-d H:i:s') . '当前项目的设置数据不存在:'.$v['id'] . PHP_EOL;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
if($settingInfo !== false){
|
|
|
|
if(empty($settingInfo['anchor_setting'])){
|
|
|
|
$settingInfo['anchor_setting'] = '["3","4","5"]';
|
|
|
|
}
|
|
|
|
if(empty($settingInfo['anchor_page_num'])){
|
|
|
|
$settingInfo['anchor_page_num'] = 1;
|
|
|
|
}
|
|
|
|
//新增一条数据
|
|
|
|
$data = [
|
|
|
|
'anchor_setting'=>$settingInfo['anchor_setting'],
|
|
|
|
'anchor_setting'=>'["3","4","5"]',
|
|
|
|
'anchor_is_enable'=>1,
|
|
|
|
'anchor_page_num'=>$settingInfo['anchor_page_num'],
|
|
|
|
'anchor_keyword_is_enable'=>1
|
|
|
|
'anchor_page_num'=>1,
|
|
|
|
'anchor_num'=>2,
|
|
|
|
'anchor_keyword_is_enable'=>1,
|
|
|
|
'project_id'=>$v['id']
|
|
|
|
];
|
|
|
|
$webSettingModel->edit($data,['project_id'=>$v['id']]);
|
|
|
|
$webSettingModel->add($data);
|
|
|
|
}
|
|
|
|
DB::disconnect('custom_mysql');
|
|
|
|
}
|
...
|
...
|
|