diff --git a/IRaCIS.Core.Application/Service/Common/DTO/CommonDocumentViewModel.cs b/IRaCIS.Core.Application/Service/Common/DTO/CommonDocumentViewModel.cs index 77e41901d..41891c999 100644 --- a/IRaCIS.Core.Application/Service/Common/DTO/CommonDocumentViewModel.cs +++ b/IRaCIS.Core.Application/Service/Common/DTO/CommonDocumentViewModel.cs @@ -48,6 +48,8 @@ namespace IRaCIS.Core.Application.ViewModel { public Guid? Id { get; set; } public string Name { get; set; } = String.Empty; + + public string NameCN { get; set; } = String.Empty; public string Path { get; set; } = String.Empty; public string Description { get; set; } = String.Empty; public bool IsDeleted { get; set; } diff --git a/IRaCIS.Core.Application/Service/Common/MailService.cs b/IRaCIS.Core.Application/Service/Common/MailService.cs index ef2839944..9fa965d6b 100644 --- a/IRaCIS.Core.Application/Service/Common/MailService.cs +++ b/IRaCIS.Core.Application/Service/Common/MailService.cs @@ -49,7 +49,7 @@ namespace IRaCIS.Application.Services Task DoctorJoinTrialEmail(Guid trialId, Guid doctorId, string baseUrl, string rootUrl); - + Task UserFeedBackMail(Guid feedBackId); } public class MailVerificationService : BaseService, IMailVerificationService @@ -733,7 +733,7 @@ namespace IRaCIS.Application.Services //用户反馈邮件 - public async Task UserFeedBack(Guid feedBackId) + public async Task UserFeedBackMail(Guid feedBackId) { var feedBack = await _repository.Where(t => t.Id == feedBackId).Include(t => t.CreateUser).ThenInclude(t => t.UserTypeRole).FirstNotNullAsync(); @@ -789,7 +789,7 @@ namespace IRaCIS.Application.Services }; - messageToSend = await GetEmailSubejctAndHtmlInfoAndBuildAsync(EmailBusinessScenario.UserResetEmail, messageToSend, emailConfigFunc); + messageToSend = await GetEmailSubejctAndHtmlInfoAndBuildAsync(EmailBusinessScenario.IRImageError, messageToSend, emailConfigFunc); } //项目相关的反馈 pm admin @@ -829,7 +829,7 @@ namespace IRaCIS.Application.Services }; - messageToSend = await GetEmailSubejctAndHtmlInfoAndBuildAsync(EmailBusinessScenario.UserResetEmail, messageToSend, emailConfigFunc); + messageToSend = await GetEmailSubejctAndHtmlInfoAndBuildAsync(EmailBusinessScenario.TrialFeedBack, messageToSend, emailConfigFunc); } //项目无关的反馈 admin zyss @@ -862,7 +862,7 @@ namespace IRaCIS.Application.Services }; - messageToSend = await GetEmailSubejctAndHtmlInfoAndBuildAsync(EmailBusinessScenario.UserResetEmail, messageToSend, emailConfigFunc); + messageToSend = await GetEmailSubejctAndHtmlInfoAndBuildAsync(EmailBusinessScenario.SysFeedBack, messageToSend, emailConfigFunc); } await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig); diff --git a/IRaCIS.Core.Application/Service/Management/UserFeedBackService.cs b/IRaCIS.Core.Application/Service/Management/UserFeedBackService.cs index 5a950602d..f965b0b78 100644 --- a/IRaCIS.Core.Application/Service/Management/UserFeedBackService.cs +++ b/IRaCIS.Core.Application/Service/Management/UserFeedBackService.cs @@ -11,6 +11,8 @@ using IRaCIS.Core.Application.ViewModel; using Newtonsoft.Json; using IRaCIS.Core.Domain.Share; using IRaCIS.Core.Infrastructure; +using MailKit; +using IRaCIS.Application.Services; namespace IRaCIS.Core.Application.Service { /// @@ -49,7 +51,7 @@ namespace IRaCIS.Core.Application.Service .ProjectTo(_mapper.ConfigurationProvider); - var pageList = await userFeedBackQueryable.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrWhiteSpace(inQuery.SortField) ? nameof(UserFeedBackView.Id) : inQuery.SortField,inQuery.Asc); + var pageList = await userFeedBackQueryable.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrWhiteSpace(inQuery.SortField) ? nameof(UserFeedBackView.Id) : inQuery.SortField, inQuery.Asc); return pageList; } @@ -69,7 +71,8 @@ namespace IRaCIS.Core.Application.Service } - public async Task AddOrUpdateUserFeedBack(UserFeedBackAddOrEdit addOrEditUserFeedBack) + public async Task AddOrUpdateUserFeedBack(UserFeedBackAddOrEdit addOrEditUserFeedBack, + [FromServices] IMailVerificationService mailService) { addOrEditUserFeedBack.ScreenshotListStr = JsonConvert.SerializeObject(addOrEditUserFeedBack.ScreenshotList); @@ -105,8 +108,15 @@ namespace IRaCIS.Core.Application.Service } } + + var entity = await _userFeedBackRepository.InsertOrUpdateAsync(addOrEditUserFeedBack, true); + if (addOrEditUserFeedBack.VisitTaskId != null || addOrEditUserFeedBack.Id == null) + { + //await mailService.UserFeedBackMail(entity.Id); + } + return ResponseOutput.Ok(entity.Id.ToString()); } diff --git a/IRaCIS.Core.Domain.Share/Common/EmailScenarioEnum.cs b/IRaCIS.Core.Domain.Share/Common/EmailScenarioEnum.cs index ee22efd38..2520324b9 100644 --- a/IRaCIS.Core.Domain.Share/Common/EmailScenarioEnum.cs +++ b/IRaCIS.Core.Domain.Share/Common/EmailScenarioEnum.cs @@ -87,6 +87,12 @@ namespace IRaCIS.Core.Domain.Share //不登陆通过邮箱重置密码 UnloginUseEmailResetPassword = 23, + IRImageError=24, + + SysFeedBack=26, + + TrialFeedBack=27 + } diff --git a/IRaCIS.Core.Domain/Common/CommonDocument.cs b/IRaCIS.Core.Domain/Common/CommonDocument.cs index 451b0f51c..37a29aeee 100644 --- a/IRaCIS.Core.Domain/Common/CommonDocument.cs +++ b/IRaCIS.Core.Domain/Common/CommonDocument.cs @@ -23,6 +23,8 @@ namespace IRaCIS.Core.Domain.Models [Required] public string Name { get; set; } = String.Empty; + public string NameCN { get; set; } = string.Empty; + /// /// Path ///