修改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
6c434e2ace
commit
ece6832bb8
|
@ -324,7 +324,7 @@ namespace IRaCIS.Application.Contracts
|
|||
|
||||
public class SendEmailInDto
|
||||
{
|
||||
public string Email { get; set; }
|
||||
public List<string> Email { get; set; }
|
||||
|
||||
public string Url { get; set; }
|
||||
}
|
||||
|
@ -400,12 +400,12 @@ namespace IRaCIS.Application.Contracts
|
|||
/// <summary>
|
||||
/// 适应症
|
||||
/// </summary>
|
||||
public string Indication { get; set; }
|
||||
public string Indication { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 适应症
|
||||
/// </summary>
|
||||
public string IndicationEn { get; set; }
|
||||
public string IndicationEn { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 项目Id
|
||||
|
|
|
@ -301,7 +301,12 @@ namespace IRaCIS.Core.Application.Service
|
|||
var messageToSend = new MimeMessage();
|
||||
//发件地址
|
||||
messageToSend.From.Add(new MailboxAddress(_systemEmailConfig.FromName, _systemEmailConfig.FromEmail));
|
||||
messageToSend.To.Add(new MailboxAddress(String.Empty, inDto.Email));
|
||||
foreach (var item in inDto.Email)
|
||||
{
|
||||
messageToSend.To.Add(new MailboxAddress(String.Empty, item));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Func<(string topicStr, string htmlBodyStr), (string topicStr, string htmlBodyStr)> emailConfigFunc = input =>
|
||||
|
|
|
@ -223,6 +223,16 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
}
|
||||
|
||||
public class UseEmialGetDoctorInfoOutDto
|
||||
{
|
||||
public Guid DoctorId { get; set; }
|
||||
}
|
||||
|
||||
public class UseEmialGetDoctorInfoInDto
|
||||
{
|
||||
public string EmailOrPhone { get; set; }
|
||||
}
|
||||
|
||||
public class VerifyEmialGetDoctorInfoInDto
|
||||
{
|
||||
public string VerificationCode { get; set; }
|
||||
|
|
|
@ -20,6 +20,7 @@ using Newtonsoft.Json;
|
|||
using System.Text.RegularExpressions;
|
||||
using static MassTransit.ValidationResultExtensions;
|
||||
using DocumentFormat.OpenXml.Vml.Spreadsheet;
|
||||
using IdentityModel.OidcClient;
|
||||
|
||||
namespace IRaCIS.Core.Application.Contracts
|
||||
{
|
||||
|
@ -114,6 +115,45 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据邮箱获取DoctorId 没有的话创建一个
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<UseEmialGetDoctorInfoOutDto> UseEmialGetDoctorInfo(UseEmialGetDoctorInfoInDto inDto)
|
||||
{
|
||||
var dockerInfo = await _doctorRepository.Where(t => t.EMail == inDto.EmailOrPhone || t.Phone == inDto.EmailOrPhone).FirstOrDefaultAsync();
|
||||
|
||||
if (dockerInfo != null)
|
||||
{
|
||||
return new UseEmialGetDoctorInfoOutDto()
|
||||
{
|
||||
DoctorId = dockerInfo.Id
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
Doctor doctor = new Doctor()
|
||||
{
|
||||
EMail = inDto.EmailOrPhone,
|
||||
IsVirtual = true,
|
||||
AcceptingNewTrial = false,
|
||||
ActivelyReading = false,
|
||||
CooperateStatus = ContractorStatusEnum.Noncooperation,
|
||||
|
||||
ReviewStatus = ReviewerInformationConfirmStatus.ConfirmRefuse
|
||||
};
|
||||
|
||||
var info = await _doctorRepository.AddAsync(doctor, true);
|
||||
|
||||
return new UseEmialGetDoctorInfoOutDto()
|
||||
{
|
||||
DoctorId = info.Id
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 验证邮箱验证码 获取医生信息Id
|
||||
/// </summary>
|
||||
|
|
Loading…
Reference in New Issue