作者 lyh

gx

@@ -53,12 +53,20 @@ class Demo extends Command @@ -53,12 +53,20 @@ class Demo extends Command
53 protected $description = 'demo'; 53 protected $description = 'demo';
54 54
55 public function handle(){ 55 public function handle(){
56 - $templateComModel = new BTemplateCom();  
57 - $templateComModel->edit(['source'=>2],['source'=>3,'is_list'=>1,'is_custom'=>0]);  
58 - $templateComModel->edit(['source'=>3],['source'=>4,'is_list'=>0,'is_custom'=>0]);  
59 - $templateComModel->edit(['source'=>3],['source'=>5,'is_list'=>1,'is_custom'=>0]);  
60 - $templateComModel->edit(['source'=>4],['source'=>6,'is_list'=>0,'is_custom'=>0]);  
61 - $templateComModel->edit(['source'=>4],['source'=>7,'is_list'=>1,'is_custom'=>0]); 56 + $projectModel = new Project();
  57 + $list = $projectModel->list(['type'=>['!=',0],'delete_status'=>0]);
  58 + foreach ($list as $v){
  59 + echo date('Y-m-d H:i:s') . 'project_id:'.$v['id'] . PHP_EOL;
  60 + ProjectServer::useProject($v['id']);
  61 + $templateComModel = new BTemplateCom();
  62 + $templateComModel->edit(['source'=>2],['source'=>3,'is_list'=>1,'is_custom'=>0]);
  63 + $templateComModel->edit(['source'=>3],['source'=>4,'is_list'=>0,'is_custom'=>0]);
  64 + $templateComModel->edit(['source'=>3],['source'=>5,'is_list'=>1,'is_custom'=>0]);
  65 + $templateComModel->edit(['source'=>4],['source'=>6,'is_list'=>0,'is_custom'=>0]);
  66 + $templateComModel->edit(['source'=>4],['source'=>7,'is_list'=>1,'is_custom'=>0]);
  67 + DB::disconnect('custom_mysql');
  68 + }
  69 +
62 } 70 }
63 71
64 public function synchronizationFile($path_name){ 72 public function synchronizationFile($path_name){