正在显示
1 个修改的文件
包含
3 行增加
和
3 行删除
| @@ -84,7 +84,7 @@ class RouteMap extends Base | @@ -84,7 +84,7 @@ class RouteMap extends Base | ||
| 84 | } | 84 | } |
| 85 | $i=1;//路由重复时拼接 | 85 | $i=1;//路由重复时拼接 |
| 86 | $route = $sign.$suffix; | 86 | $route = $sign.$suffix; |
| 87 | - while(self::isExist($route, $source_id, $project_id)){ | 87 | + while(self::isExist($route, $source_id, $project_id,$source)){ |
| 88 | $route = $sign .'-'.$i.$suffix; | 88 | $route = $sign .'-'.$i.$suffix; |
| 89 | $i++; | 89 | $i++; |
| 90 | } | 90 | } |
| @@ -99,7 +99,7 @@ class RouteMap extends Base | @@ -99,7 +99,7 @@ class RouteMap extends Base | ||
| 99 | * @time :2025/3/12 9:51 | 99 | * @time :2025/3/12 9:51 |
| 100 | * @param :route:路由 source:模块类型 source_id:对应数据id | 100 | * @param :route:路由 source:模块类型 source_id:对应数据id |
| 101 | */ | 101 | */ |
| 102 | - protected static function isExist($route, $source_id, $project_id){ | 102 | + protected static function isExist($route, $source_id, $project_id,$source){ |
| 103 | $fixed = ['api']; //固定的路由 | 103 | $fixed = ['api']; //固定的路由 |
| 104 | if(in_array($route, $fixed)){ | 104 | if(in_array($route, $fixed)){ |
| 105 | return true; | 105 | return true; |
| @@ -109,7 +109,7 @@ class RouteMap extends Base | @@ -109,7 +109,7 @@ class RouteMap extends Base | ||
| 109 | ]; | 109 | ]; |
| 110 | $route = self::where($where)->first(); | 110 | $route = self::where($where)->first(); |
| 111 | if($route){ | 111 | if($route){ |
| 112 | - if($route->source_id != $source_id){ | 112 | + if(($route->source_id != $source_id) && ($source != $route->source)){ |
| 113 | return true; | 113 | return true; |
| 114 | } | 114 | } |
| 115 | } | 115 | } |
-
请 注册 或 登录 后发表评论