作者 lyh

gxai

... ... @@ -84,7 +84,7 @@ class RouteMap extends Base
}
$i=1;//路由重复时拼接
$route = $sign.$suffix;
while(self::isExist($route, $source_id, $project_id)){
while(self::isExist($route, $source_id, $project_id,$source)){
$route = $sign .'-'.$i.$suffix;
$i++;
}
... ... @@ -99,7 +99,7 @@ class RouteMap extends Base
* @time :2025/3/12 9:51
* @param :route:路由 source:模块类型 source_id:对应数据id
*/
protected static function isExist($route, $source_id, $project_id){
protected static function isExist($route, $source_id, $project_id,$source){
$fixed = ['api']; //固定的路由
if(in_array($route, $fixed)){
return true;
... ... @@ -109,7 +109,7 @@ class RouteMap extends Base
];
$route = self::where($where)->first();
if($route){
if($route->source_id != $source_id){
if(($route->source_id != $source_id) && ($source != $route->source)){
return true;
}
}
... ...