diff --git a/IRaCIS.Core.Application/Service/Management/UserService.cs b/IRaCIS.Core.Application/Service/Management/UserService.cs index e21617596..fa3e91e48 100644 --- a/IRaCIS.Core.Application/Service/Management/UserService.cs +++ b/IRaCIS.Core.Application/Service/Management/UserService.cs @@ -607,7 +607,7 @@ namespace IRaCIS.Core.Application.Service //await VerifyUserPhoneAsync(model.Id, model.UserTypeId, model.Phone); - var user = await _identityUserRepository.Where(t => t.Id == model.Id, true).Include(t => t.UserRoleList).Include(t => t.IdentityUserHospitalGroupList).FirstOrDefaultAsync(); + var user = await _identityUserRepository.Where(t => t.Id == model.Id, true).Include(t => t.UserRoleList)/*.Include(t => t.IdentityUserHospitalGroupList)*/.FirstOrDefaultAsync(); if (user == null) return Null404NotFound(user); @@ -657,15 +657,15 @@ namespace IRaCIS.Core.Application.Service } - var existHospitalGroupIdList = user.IdentityUserHospitalGroupList.Select(t => t.HospitalGroupId).ToList(); + //var existHospitalGroupIdList = user.IdentityUserHospitalGroupList.Select(t => t.HospitalGroupId).ToList(); - var removeIdList = existHospitalGroupIdList.Except(model.HospitalGroupIdList).ToList(); + //var removeIdList = existHospitalGroupIdList.Except(model.HospitalGroupIdList).ToList(); - user.IdentityUserHospitalGroupList = user.IdentityUserHospitalGroupList.Where(t => !removeIdList.Contains(t.HospitalGroupId)).ToList(); + //user.IdentityUserHospitalGroupList = user.IdentityUserHospitalGroupList.Where(t => !removeIdList.Contains(t.HospitalGroupId)).ToList(); - var addIdList = model.HospitalGroupIdList.Except(existHospitalGroupIdList).ToList(); + //var addIdList = model.HospitalGroupIdList.Except(existHospitalGroupIdList).ToList(); - user.IdentityUserHospitalGroupList.AddRange(addIdList.Select(t => new HospitalGroupIdentityUser() { HospitalGroupId = t, IsManager = false, IdentityUserId = user.Id })); + //user.IdentityUserHospitalGroupList.AddRange(addIdList.Select(t => new HospitalGroupIdentityUser() { HospitalGroupId = t, IsManager = false, IdentityUserId = user.Id })); var success = await _identityUserRepository.SaveChangesAsync(); diff --git a/IRaCIS.Core.Application/Service/Management/_MapConfig.cs b/IRaCIS.Core.Application/Service/Management/_MapConfig.cs index 29d9570d1..ca442aa59 100644 --- a/IRaCIS.Core.Application/Service/Management/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/Management/_MapConfig.cs @@ -140,7 +140,8 @@ namespace IRaCIS.Core.Application.Service CreateMap(); - CreateMap(); + CreateMap() + .ForMember(d => d.UserRoleList, c => c.Ignore()); CreateMap() .ForMember(d => d.IdentityUserId, c => c.MapFrom(t => t.Id)) diff --git a/IRaCIS.Core.Domain/Management/HospitalGroup.cs b/IRaCIS.Core.Domain/Management/HospitalGroup.cs index 86fcc984a..f4ca5c9e0 100644 --- a/IRaCIS.Core.Domain/Management/HospitalGroup.cs +++ b/IRaCIS.Core.Domain/Management/HospitalGroup.cs @@ -61,7 +61,7 @@ namespace IRaCIS.Core.Domain.Models [Comment("后台 - 系统真实账户表")] [Table("IdentityUser")] - public class IdentityUser : BaseFullAuditEntityNoNavigat + public class IdentityUser : BaseFullAuditEntity { [JsonIgnore] diff --git a/IRaCIS.Core.Domain/Management/User.cs b/IRaCIS.Core.Domain/Management/User.cs index 3e93ea95e..1dbbaec99 100644 --- a/IRaCIS.Core.Domain/Management/User.cs +++ b/IRaCIS.Core.Domain/Management/User.cs @@ -5,7 +5,7 @@ namespace IRaCIS.Core.Domain.Models; [Comment("̨ - ϵͳ˻")] [Table("User")] -public class UserRole : BaseFullAuditEntityNoNavigat +public class UserRole : BaseFullAuditEntity { #region diff --git a/IRaCIS.Core.Infra.EFCore/IRaCIS.Core.Infra.EFCore.csproj b/IRaCIS.Core.Infra.EFCore/IRaCIS.Core.Infra.EFCore.csproj index d0b656afe..12aa90fdc 100644 --- a/IRaCIS.Core.Infra.EFCore/IRaCIS.Core.Infra.EFCore.csproj +++ b/IRaCIS.Core.Infra.EFCore/IRaCIS.Core.Infra.EFCore.csproj @@ -31,12 +31,12 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive