From ba49164db6aea646ea7f97176b70cafe313b71a4 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 31 Dec 2024 17:49:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=99=BB=E5=BD=95=E4=B8=AD?= =?UTF-8?q?=E5=BF=83=E8=B0=83=E7=A0=94=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Service/Management/UserService.cs | 5 ++++- .../Service/SiteSurvey/TrialSiteSurveyService.cs | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Management/UserService.cs b/IRaCIS.Core.Application/Service/Management/UserService.cs index f47188a63..dc43fb811 100644 --- a/IRaCIS.Core.Application/Service/Management/UserService.cs +++ b/IRaCIS.Core.Application/Service/Management/UserService.cs @@ -503,8 +503,11 @@ namespace IRaCIS.Core.Application.Service var user = await _identityUserRepository.Where(t => t.Id == identityUserId).ProjectTo(_mapper.ConfigurationProvider).FirstOrDefaultAsync(); - user.AccountList = await _userRoleRepository.Where(t => t.IdentityUserId == identityUserId).ProjectTo(_mapper.ConfigurationProvider).ToListAsync(); + if (user != null) + { + user.AccountList = await _userRoleRepository.Where(t => t.IdentityUserId == identityUserId).ProjectTo(_mapper.ConfigurationProvider).ToListAsync(); + } return user; } diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs index d8aebca1a..80086e4a6 100644 --- a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs +++ b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs @@ -523,7 +523,7 @@ namespace IRaCIS.Core.Application.Contracts } else if (verifyRecord.ExpirationTime < DateTime.Now) { - return ResponseOutput.NotOk(_localizer["TrialSiteSurvey_WrongVerificationCode"]); + return ResponseOutput.NotOk(_localizer["TrialSiteSurvey_ExpiredVerificationCode"]); } else {