作者 李宇航

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

gx脚本更新路由



查看合并请求 !962
@@ -82,6 +82,7 @@ class UpdateBuildConfiguration extends Command @@ -82,6 +82,7 @@ class UpdateBuildConfiguration extends Command
82 $productModel = new Product(); 82 $productModel = new Product();
83 $lists = $productModel->list(); 83 $lists = $productModel->list();
84 $detailModel = new Detail(); 84 $detailModel = new Detail();
  85 + if(!empty($lists)){
85 foreach ($lists as $k => $v){ 86 foreach ($lists as $k => $v){
86 echo date('Y-m-d H:i:s') . '产品id:'.$v['id'] . PHP_EOL; 87 echo date('Y-m-d H:i:s') . '产品id:'.$v['id'] . PHP_EOL;
87 $data = [ 88 $data = [
@@ -90,10 +91,14 @@ class UpdateBuildConfiguration extends Command @@ -90,10 +91,14 @@ class UpdateBuildConfiguration extends Command
90 'text_type'=>1, 91 'text_type'=>1,
91 'title'=>'', 92 'title'=>'',
92 'sort'=>1, 93 'sort'=>1,
93 - 'content'=>$v['describe'] 94 + 'content'=>$v['describe'],
  95 + 'created_at'=>date('Y-m-d H:i:s'),
  96 + 'updated_at'=>date('Y-m-d H:i:s')
94 ]; 97 ];
95 - $detailModel->add($data); 98 + $detailModel->insert($data);
96 } 99 }
97 } 100 }
  101 + return true;
  102 + }
98 103
99 } 104 }