作者 李宇航

合并分支 'master-server' 到 'master'

gx脚本



查看合并请求 !1345
@@ -67,22 +67,16 @@ class UpdateRoute extends Command @@ -67,22 +67,16 @@ class UpdateRoute extends Command
67 $settingInfo = $webSettingModel->read(['project_id'=>$v['id']]); 67 $settingInfo = $webSettingModel->read(['project_id'=>$v['id']]);
68 if($settingInfo === false){ 68 if($settingInfo === false){
69 echo date('Y-m-d H:i:s') . '当前项目的设置数据不存在:'.$v['id'] . PHP_EOL; 69 echo date('Y-m-d H:i:s') . '当前项目的设置数据不存在:'.$v['id'] . PHP_EOL;
70 - continue;  
71 - }  
72 - if($settingInfo !== false){  
73 - if(empty($settingInfo['anchor_setting'])){  
74 - $settingInfo['anchor_setting'] = '["3","4","5"]';  
75 - }  
76 - if(empty($settingInfo['anchor_page_num'])){  
77 - $settingInfo['anchor_page_num'] = 1;  
78 - } 70 + //新增一条数据
79 $data = [ 71 $data = [
80 - 'anchor_setting'=>$settingInfo['anchor_setting'], 72 + 'anchor_setting'=>'["3","4","5"]',
81 'anchor_is_enable'=>1, 73 'anchor_is_enable'=>1,
82 - 'anchor_page_num'=>$settingInfo['anchor_page_num'],  
83 - 'anchor_keyword_is_enable'=>1 74 + 'anchor_page_num'=>1,
  75 + 'anchor_num'=>2,
  76 + 'anchor_keyword_is_enable'=>1,
  77 + 'project_id'=>$v['id']
84 ]; 78 ];
85 - $webSettingModel->edit($data,['project_id'=>$v['id']]); 79 + $webSettingModel->add($data);
86 } 80 }
87 DB::disconnect('custom_mysql'); 81 DB::disconnect('custom_mysql');
88 } 82 }