正在显示
1 个修改的文件
包含
12 行增加
和
19 行删除
| @@ -57,26 +57,19 @@ class lyhDemo extends Command | @@ -57,26 +57,19 @@ class lyhDemo extends Command | ||
| 57 | protected $description = '更新路由'; | 57 | protected $description = '更新路由'; |
| 58 | 58 | ||
| 59 | public function handle(){ | 59 | public function handle(){ |
| 60 | - $str = '3671,955,752,1270,439,2674,3588,2388,1271,1543,738,624,552,1417,1237,651,1143,817,1556,1234,1350,650,538,491,631,2059,1845,866,1194,1699,546,684,905,1805,1728,2811,952,2972,2827,983,812,3081,554,741,1349,980'; | ||
| 61 | - $arr = explode(',',$str); | ||
| 62 | - $model = new TranslateBigProject(); | ||
| 63 | - foreach ($arr as $val){ | ||
| 64 | - $model->addReturnId(['project_id'=>$val]); | 60 | + $projectModel = new Project(); |
| 61 | + $lists = $projectModel->list(['delete_status' => 0,'project_type'=>0,'extend_type'=>0,'type'=>['in',[1,2,3,4,6]]], 'id', ['id']); | ||
| 62 | + foreach ($lists as $item){ | ||
| 63 | +// echo date('Y-m-d H:i:s') . '开始--项目的id:'. $item['id'] . PHP_EOL; | ||
| 64 | + ProjectServer::useProject($item['id']); | ||
| 65 | + $webSettingModel = new WebSetting(); | ||
| 66 | + $info = $webSettingModel->read(['project_id'=>$item['id']]); | ||
| 67 | + if($info === false){ | ||
| 68 | + $webSettingModel->addReturnId(['project_id'=>$item['id']]); | ||
| 69 | + echo '当前数据为空:'.$item['id'].PHP_EOL; | ||
| 70 | + } | ||
| 71 | + DB::disconnect('custom_mysql'); | ||
| 65 | } | 72 | } |
| 66 | - return true; | ||
| 67 | -// $projectModel = new Project(); | ||
| 68 | -// $lists = $projectModel->list(['delete_status' => 0,'project_type'=>0,'extend_type'=>0,'type'=>['in',[1,2,3,4,6]]], 'id', ['id']); | ||
| 69 | -// foreach ($lists as $item){ | ||
| 70 | -//// echo date('Y-m-d H:i:s') . '开始--项目的id:'. $item['id'] . PHP_EOL; | ||
| 71 | -// ProjectServer::useProject($item['id']); | ||
| 72 | -// $webSettingModel = new WebSetting(); | ||
| 73 | -// $info = $webSettingModel->read(['project_id'=>$item['id']]); | ||
| 74 | -// if($info === false){ | ||
| 75 | -// $webSettingModel->addReturnId(['project_id'=>$item['id']]); | ||
| 76 | -// echo '当前数据为空:'.$item['id'].PHP_EOL; | ||
| 77 | -// } | ||
| 78 | -// DB::disconnect('custom_mysql'); | ||
| 79 | -// } | ||
| 80 | } | 73 | } |
| 81 | 74 | ||
| 82 | public function _actionTemplateMain(){ | 75 | public function _actionTemplateMain(){ |
-
请 注册 或 登录 后发表评论