fix 数据库域问题
This commit is contained in:
@@ -3,6 +3,7 @@ using Dlhis.Entity.Sys.Enums;
|
||||
using Dlhis.Sys.Identity.Services;
|
||||
using Dlhis.Sys.Menu.Request;
|
||||
using Dlhis.Sys.Menu.Response;
|
||||
using Kurisu.AspNetCore.Scope;
|
||||
using Kurisu.AspNetCore.Utils.Extensions;
|
||||
using Kurisu.Core.Result;
|
||||
using Kurisu.Core.User.Abstractions;
|
||||
@@ -16,13 +17,11 @@ public class MenuService : IMenuService
|
||||
{
|
||||
private readonly IDbContext _dbContext;
|
||||
private readonly ICurrentUser _currentUser;
|
||||
private readonly IUserService _userService;
|
||||
|
||||
public MenuService(IDbContext dbContext, ICurrentUser currentUser, IUserService userService)
|
||||
public MenuService(IDbContext dbContext, ICurrentUser currentUser)
|
||||
{
|
||||
_dbContext = dbContext;
|
||||
_currentUser = currentUser;
|
||||
_userService = userService;
|
||||
}
|
||||
|
||||
public async Task<List<MenuResponse>> GetListAsync(PlatformEnumType platform)
|
||||
@@ -270,7 +269,10 @@ public class MenuService : IMenuService
|
||||
|
||||
private async Task<List<string>> GetAllAssignmentCodesAsync()
|
||||
{
|
||||
var user = await _userService.GetUserByIdAsync(_currentUser.GetIntSubjectId());
|
||||
var user = await Scoped.Request.Value.CreateAsync(sp =>
|
||||
{
|
||||
return sp.GetService<IUserService>().GetUserByIdAsync(_currentUser.GetIntSubjectId());
|
||||
});
|
||||
|
||||
// var groupCodes = await GetAssignmentCodesAsync(MenuPermissionTypeEnumType.Group, manager.usergrp);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user