正在显示
1 个修改的文件
包含
1 行增加
和
6 行删除
| @@ -98,11 +98,7 @@ class UpdateRoute extends Command | @@ -98,11 +98,7 @@ class UpdateRoute extends Command | ||
| 98 | * @time :2023/11/21 18:48 | 98 | * @time :2023/11/21 18:48 |
| 99 | */ | 99 | */ |
| 100 | public function productRoute($route,$id,$i = 0){ | 100 | public function productRoute($route,$id,$i = 0){ |
| 101 | - if($i == 0){ | ||
| 102 | - $routes = $route.'-product'; | ||
| 103 | - }else{ | ||
| 104 | - $routes = $route.'-'.$i.'-product'; | ||
| 105 | - } | 101 | + $routes = $route.'-product'; |
| 106 | $routeMapModel = new RouteMap(); | 102 | $routeMapModel = new RouteMap(); |
| 107 | $routeInfo = $routeMapModel->read(['route'=>$routes,'id'=>['!=',$id]]); | 103 | $routeInfo = $routeMapModel->read(['route'=>$routes,'id'=>['!=',$id]]); |
| 108 | if($routeInfo === false){ | 104 | if($routeInfo === false){ |
| @@ -110,7 +106,6 @@ class UpdateRoute extends Command | @@ -110,7 +106,6 @@ class UpdateRoute extends Command | ||
| 110 | return $routes; | 106 | return $routes; |
| 111 | }else{ | 107 | }else{ |
| 112 | $i = $i + 1; | 108 | $i = $i + 1; |
| 113 | - $route = $route.'-'.$i; | ||
| 114 | return $this->productRoute($route,$id,$i); | 109 | return $this->productRoute($route,$id,$i); |
| 115 | } | 110 | } |
| 116 | } | 111 | } |
-
请 注册 或 登录 后发表评论