正在显示
1 个修改的文件
包含
2 行增加
和
3 行删除
| @@ -50,15 +50,14 @@ class EditPage extends Command | @@ -50,15 +50,14 @@ class EditPage extends Command | ||
| 50 | //获取所有项目 | 50 | //获取所有项目 |
| 51 | $projectModel = new Project(); | 51 | $projectModel = new Project(); |
| 52 | $list = $projectModel->list(['type'=>['in',[1,2,3,4]]]); | 52 | $list = $projectModel->list(['type'=>['in',[1,2,3,4]]]); |
| 53 | - | ||
| 54 | try { | 53 | try { |
| 55 | foreach ($list as $v){ | 54 | foreach ($list as $v){ |
| 56 | echo date('Y-m-d H:i:s') . ' start: '. $v['id'] . PHP_EOL; | 55 | echo date('Y-m-d H:i:s') . ' start: '. $v['id'] . PHP_EOL; |
| 57 | ProjectServer::useProject($v['id']); | 56 | ProjectServer::useProject($v['id']); |
| 58 | BCustomTemplate::where('url', 'like', '%-tag%') | 57 | BCustomTemplate::where('url', 'like', '%-tag%') |
| 59 | ->update(['url' => DB::raw("REPLACE(url, '-tag', '')")]); | 58 | ->update(['url' => DB::raw("REPLACE(url, '-tag', '')")]); |
| 60 | - RouteMap::where('url', 'like', '%-tag%')->where('source','page') | ||
| 61 | - ->update(['url' => DB::raw("REPLACE(url, '-tag', '')")]); | 59 | + RouteMap::where('route', 'like', '%-tag%')->where('source','page') |
| 60 | + ->update(['route' => DB::raw("REPLACE(route, '-tag', '')")]); | ||
| 62 | DB::disconnect('custom_mysql'); | 61 | DB::disconnect('custom_mysql'); |
| 63 | } | 62 | } |
| 64 | }catch (\Exception $e){ | 63 | }catch (\Exception $e){ |
-
请 注册 或 登录 后发表评论