|
@@ -56,14 +56,12 @@ class Demo extends Command |
|
@@ -56,14 +56,12 @@ class Demo extends Command |
|
56
|
$projectModel = new Project();
|
56
|
$projectModel = new Project();
|
|
57
|
$list = $projectModel->list(['type'=>['!=',0],'delete_status'=>0]);
|
57
|
$list = $projectModel->list(['type'=>['!=',0],'delete_status'=>0]);
|
|
58
|
foreach ($list as $v){
|
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']);
|
59
|
ProjectServer::useProject($v['id']);
|
|
61
|
$templateComModel = new BTemplateCom();
|
60
|
$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]);
|
61
|
+ $info = $templateComModel->read(['source'=>5,'is_list'=>0]);
|
|
|
|
62
|
+ if($info !== false){
|
|
|
|
63
|
+ echo date('Y-m-d H:i:s') . 'project_id:'.$v['id'] . PHP_EOL;
|
|
|
|
64
|
+ }
|
|
67
|
DB::disconnect('custom_mysql');
|
65
|
DB::disconnect('custom_mysql');
|
|
68
|
}
|
66
|
}
|
|
69
|
|
67
|
|