ow
This commit is contained in:
1 parent
4d946d9dfc
commit
13d3047102
5 files changed
+64
-38
No files matched your search
@@ -253,16 +253,18 @@ namespace CloudBuilder.Security.Service
|
||||
|
||||
if (maps == null || maps.Length == 0) return;
|
||||
|
||||
|
||||
int maxOrderBy = 0;
|
||||
foreach (SecurityFunctionMapViewEntity map in maps)
|
||||
{
|
||||
SecurityFunctionMapViewEntity[] oldMaps = repositoryMapView.Entities.Where(x => x.ParentFunctionName == map.ParentFunctionName).ToArray();
|
||||
|
||||
if (oldMaps != null && oldMaps.Count() > 0) maxOrderBy = oldMaps.Max(x => x.Orderby);
|
||||
|
||||
repositoryMap.InsertNow(new SecurityFunctionMapEntity()
|
||||
{
|
||||
FunctionNameSon = functionName,
|
||||
FunctionNameParent = map.ParentFunctionName,
|
||||
Orderby = oldMaps == null ? 1 : oldMaps.Max(x => x.Orderby) + 1
|
||||
Orderby = oldMaps == null ? 1 : maxOrderBy + 1
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user