fix 菜单查看调整
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
using Dlhis.Entity.Sys.Entities;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using Dlhis.Entity.Sys.Entities;
|
||||||
using Dlhis.Entity.Sys.Enums;
|
using Dlhis.Entity.Sys.Enums;
|
||||||
using Dlhis.Sys.Identity.Services;
|
using Dlhis.Sys.Identity.Services;
|
||||||
using Dlhis.Sys.Menu.Request;
|
using Dlhis.Sys.Menu.Request;
|
||||||
@@ -41,7 +42,7 @@ public class MenuService : IMenuService
|
|||||||
return top;
|
return top;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public async Task<string> SaveMenuAsync(SaveMenuRequest request)
|
public async Task<string> SaveMenuAsync(SaveMenuRequest request)
|
||||||
{
|
{
|
||||||
await CheckAsync(request);
|
await CheckAsync(request);
|
||||||
@@ -149,7 +150,12 @@ public class MenuService : IMenuService
|
|||||||
var allCodes = await GetAllAssignmentCodesAsync();
|
var allCodes = await GetAllAssignmentCodesAsync();
|
||||||
if (!allCodes.Any())
|
if (!allCodes.Any())
|
||||||
{
|
{
|
||||||
return await GetListAsync(PlatformEnumType.PCAdmin);
|
var userId = _currentUser.GetIntSubjectId();
|
||||||
|
if (userId == 1)
|
||||||
|
{
|
||||||
|
return await GetListAsync(PlatformEnumType.PCAdmin);
|
||||||
|
}
|
||||||
|
return new List<MenuResponse>();
|
||||||
}
|
}
|
||||||
|
|
||||||
var allMenus = await _dbContext.Queryable<MenuEntity>()
|
var allMenus = await _dbContext.Queryable<MenuEntity>()
|
||||||
@@ -311,5 +317,5 @@ public class MenuService : IMenuService
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user