修改邮箱
parent
a5dcad1767
commit
1ed8788c83
|
@ -523,6 +523,8 @@ namespace IRaCIS.Application.Contracts
|
||||||
{
|
{
|
||||||
public string BlindName { get; set; }
|
public string BlindName { get; set; }
|
||||||
|
|
||||||
|
public bool IsHaveAccount { get; set; } = false;
|
||||||
|
|
||||||
public string BlindNameCN { get; set; } = string.Empty;
|
public string BlindNameCN { get; set; } = string.Empty;
|
||||||
|
|
||||||
public List<DicView> DoctorDicViewDtos = new List<DicView>();
|
public List<DicView> DoctorDicViewDtos = new List<DicView>();
|
||||||
|
|
|
@ -17,6 +17,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
IRepository<DoctorDictionary> _doctorDictionaryRepository,
|
IRepository<DoctorDictionary> _doctorDictionaryRepository,
|
||||||
IRepository<DoctorSummarize> _doctorSummarizeRepository,
|
IRepository<DoctorSummarize> _doctorSummarizeRepository,
|
||||||
IRepository<Enroll> _enrollRepository,
|
IRepository<Enroll> _enrollRepository,
|
||||||
|
IRepository<UserRole> _userRoleRepository,
|
||||||
IRepository<Hospital> _hospitalRepository,
|
IRepository<Hospital> _hospitalRepository,
|
||||||
IRepository<Dictionary> _dictionaryRepository,
|
IRepository<Dictionary> _dictionaryRepository,
|
||||||
IRepository<Attachment> _attachmentRepository,
|
IRepository<Attachment> _attachmentRepository,
|
||||||
|
@ -490,7 +491,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
var doctorBasicInfo = (await _doctorRepository.Where(t => t.Id == doctorId)
|
var doctorBasicInfo = (await _doctorRepository.Where(t => t.Id == doctorId)
|
||||||
.ProjectTo<DoctorBasicInfoDTO>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
.ProjectTo<DoctorBasicInfoDTO>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
||||||
|
doctorBasicInfo.IsHaveAccount =await _userRoleRepository.AnyAsync(x => x.DoctorId == doctorId);
|
||||||
return doctorBasicInfo;
|
return doctorBasicInfo;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
IOptionsMonitor<ServiceVerifyConfigOption> _verifyConfig,
|
IOptionsMonitor<ServiceVerifyConfigOption> _verifyConfig,
|
||||||
IOptionsMonitor<SystemEmailSendConfig> systemEmailConfig,
|
IOptionsMonitor<SystemEmailSendConfig> systemEmailConfig,
|
||||||
IRepository<IdentityUser> _identityUserRepository,
|
IRepository<IdentityUser> _identityUserRepository,
|
||||||
|
IRepository<Doctor> _doctorRepository,
|
||||||
|
|
||||||
ISearcher _searcher, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer, IFusionCache _fusionCache) : BaseService, IUserService
|
ISearcher _searcher, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer, IFusionCache _fusionCache) : BaseService, IUserService
|
||||||
{
|
{
|
||||||
|
@ -182,6 +183,13 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
await VerifyUserEmailAsync(_userInfo.IdentityUserId, newEmail);
|
await VerifyUserEmailAsync(_userInfo.IdentityUserId, newEmail);
|
||||||
|
|
||||||
|
// 修改用户邮箱的时候 需要修改医生表的邮箱
|
||||||
|
var oldEmail =await _identityUserRepository.Where(t => t.Id == _userInfo.IdentityUserId).Select(t => t.EMail).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
await _doctorRepository.UpdatePartialFromQueryAsync(x=>x.EMail== oldEmail, u => new Doctor()
|
||||||
|
{
|
||||||
|
EMail = newEmail
|
||||||
|
});
|
||||||
|
|
||||||
await _identityUserRepository.UpdatePartialFromQueryAsync(_userInfo.IdentityUserId, u => new IdentityUser()
|
await _identityUserRepository.UpdatePartialFromQueryAsync(_userInfo.IdentityUserId, u => new IdentityUser()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue