修改映射
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
ccdad2f4fd
commit
4740e04ff1
|
@ -153,9 +153,9 @@ namespace IRaCIS.Core.Application.Service
|
||||||
.ForMember(d => d.IdentityUserId, c => c.MapFrom(t => t.Id));
|
.ForMember(d => d.IdentityUserId, c => c.MapFrom(t => t.Id));
|
||||||
CreateMap<IdentityUser, UserListDTO>();
|
CreateMap<IdentityUser, UserListDTO>();
|
||||||
|
|
||||||
CreateMap<UserRole, UserAddUserType>();
|
CreateMap<UserAddUserType, UserRole> ().ReverseMap();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CreateMap<UserRole, IdentityUserTypeDTO>()
|
CreateMap<UserRole, IdentityUserTypeDTO>()
|
||||||
.ForMember(d => d.UserTypeShortName, c => c.MapFrom(t => t.UserTypeRole.UserTypeShortName));
|
.ForMember(d => d.UserTypeShortName, c => c.MapFrom(t => t.UserTypeRole.UserTypeShortName));
|
||||||
|
|
||||||
|
|
|
@ -250,12 +250,15 @@ namespace IRaCIS.Core.Application.Service
|
||||||
var userId = userInfo.SystemUserId;
|
var userId = userInfo.SystemUserId;
|
||||||
var userTypeId = userInfo.UserTypeId;
|
var userTypeId = userInfo.UserTypeId;
|
||||||
|
|
||||||
|
var findTrialUser = await _trialIdentityUserRepository.FirstOrDefaultAsync(t => t.TrialId == trialId && t.IdentityUserId == userId);
|
||||||
|
|
||||||
|
|
||||||
//判断TrialUser中是否存在 不存在就插入 注意退出了,也不能再加进来
|
//判断TrialUser中是否存在 不存在就插入 注意退出了,也不能再加进来
|
||||||
if (!await _trialIdentityUserRepository.AnyAsync(t => t.TrialId == trialId && t.IdentityUserId == userId, true))
|
if (!await _trialUserRoleRepository.AnyAsync(t => t.TrialId == trialId && t.UserRole.IdentityUserId == userId && t.UserRole.UserTypeId==userTypeId, true))
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
await _trialUserRoleRepository.AddAsync(new TrialUserRole() { TrialId = trialId, UserId = userId, JoinTime = DateTime.Now });
|
await _trialUserRoleRepository.AddAsync(new TrialUserRole() { TrialId = trialId, UserId = userId, JoinTime = DateTime.Now });
|
||||||
|
|
||||||
await _userRoleRepository.BatchUpdateNoTrackingAsync(t => t.Id == userId, u => new UserRole() { Status = UserStateEnum.Enable });
|
await _userRoleRepository.BatchUpdateNoTrackingAsync(t => t.Id == userId, u => new UserRole() { Status = UserStateEnum.Enable });
|
||||||
|
|
|
@ -2656,7 +2656,30 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(IdentityUser)))
|
||||||
|
{
|
||||||
|
var type = GetEntityAuditOpt(item);
|
||||||
|
|
||||||
|
var entity = item.Entity as IdentityUser;
|
||||||
|
|
||||||
|
var extraIdentification = string.Empty;
|
||||||
|
|
||||||
|
//保存其他个性化配置
|
||||||
|
if (_userInfo.RequestUrl == "UserWLTemplate/setAutoCutNextTask")
|
||||||
|
{
|
||||||
|
extraIdentification = "/Personalization";
|
||||||
|
}
|
||||||
|
|
||||||
|
await InsertInspection<IdentityUser>(entity, type, x => new InspectionConvertDTO()
|
||||||
|
{
|
||||||
|
IsDistinctionInterface = false,
|
||||||
|
ExtraIndentification = extraIdentification
|
||||||
|
}, new
|
||||||
|
{
|
||||||
|
UserRealName = entity.FullName,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//分配规则
|
//分配规则
|
||||||
|
|
Loading…
Reference in New Issue