中心调研登录
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
64ea537dae
commit
1a6ec6b315
|
|
@ -3,35 +3,36 @@
|
||||||
// 生成时间 2021-12-23 13:20:59
|
// 生成时间 2021-12-23 13:20:59
|
||||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
|
using DocumentFormat.OpenXml.Spreadsheet;
|
||||||
|
using DocumentFormat.OpenXml.Vml.Spreadsheet;
|
||||||
|
using IdentityModel;
|
||||||
|
using IdentityModel.OidcClient;
|
||||||
using IRaCIS.Application.Contracts;
|
using IRaCIS.Application.Contracts;
|
||||||
using IRaCIS.Core.Application.Service;
|
|
||||||
using IRaCIS.Core.Application.Auth;
|
using IRaCIS.Core.Application.Auth;
|
||||||
using IRaCIS.Core.Application.Filter;
|
using IRaCIS.Core.Application.Filter;
|
||||||
using IRaCIS.Core.Application.Helper;
|
using IRaCIS.Core.Application.Helper;
|
||||||
|
using IRaCIS.Core.Application.Service;
|
||||||
|
using IRaCIS.Core.Application.Service.OAuth;
|
||||||
|
using IRaCIS.Core.Application.ViewModel;
|
||||||
|
using IRaCIS.Core.Domain.Models;
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
using IRaCIS.Core.Infrastructure;
|
using IRaCIS.Core.Infrastructure;
|
||||||
|
using MassTransit;
|
||||||
using Medallion.Threading;
|
using Medallion.Threading;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
using Microsoft.AspNetCore.Components.Routing;
|
||||||
|
using Microsoft.AspNetCore.Identity;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
using Microsoft.VisualBasic;
|
using Microsoft.VisualBasic;
|
||||||
using MimeKit;
|
using MimeKit;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using NPOI.SS.Formula.Functions;
|
||||||
|
using Panda.DynamicWebApi.Attributes;
|
||||||
|
using StackExchange.Redis;
|
||||||
|
using System.Security.Policy;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using static MassTransit.ValidationResultExtensions;
|
using static MassTransit.ValidationResultExtensions;
|
||||||
using DocumentFormat.OpenXml.Vml.Spreadsheet;
|
|
||||||
using IdentityModel.OidcClient;
|
|
||||||
using IRaCIS.Core.Domain.Models;
|
|
||||||
using MassTransit;
|
|
||||||
using DocumentFormat.OpenXml.Spreadsheet;
|
|
||||||
using StackExchange.Redis;
|
|
||||||
using Panda.DynamicWebApi.Attributes;
|
|
||||||
using IdentityModel;
|
|
||||||
using Microsoft.AspNetCore.Components.Routing;
|
|
||||||
using IRaCIS.Core.Application.ViewModel;
|
|
||||||
using Microsoft.AspNetCore.Identity;
|
|
||||||
using NPOI.SS.Formula.Functions;
|
|
||||||
using System.Security.Policy;
|
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Contracts
|
namespace IRaCIS.Core.Application.Contracts
|
||||||
{
|
{
|
||||||
|
|
@ -703,19 +704,24 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
//删除验证码历史记录
|
//删除验证码历史记录
|
||||||
await _verificationCodeRepository.BatchDeleteNoTrackingAsync(t => t.EmailOrPhone == userInfo.EmailOrPhone && t.Code == userInfo.verificationCode && t.CodeType == userInfo.verificationType);
|
await _verificationCodeRepository.BatchDeleteNoTrackingAsync(t => t.EmailOrPhone == userInfo.EmailOrPhone && t.Code == userInfo.verificationCode && t.CodeType == userInfo.verificationType);
|
||||||
|
|
||||||
|
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionIdentityUserId = null, ActionUserName = $"SiteSurvey_{currentEntity.Email}", OptType = UserOptType.Login, IsLoginUncommonly = false });
|
||||||
await _trialSiteSurveyRepository.SaveChangesAsync();
|
await _trialSiteSurveyRepository.SaveChangesAsync();
|
||||||
|
|
||||||
|
var newId = Guid.NewGuid();
|
||||||
|
|
||||||
return ResponseOutput.Ok(new
|
return ResponseOutput.Ok(new
|
||||||
{
|
{
|
||||||
TrialSiteSurveyId = currentEntity!.Id,
|
TrialSiteSurveyId = currentEntity!.Id,
|
||||||
Token = _tokenService.GetToken(new UserTokenInfo()
|
Token = _tokenService.GetToken(new UserTokenInfo()
|
||||||
{
|
{
|
||||||
IdentityUserId = Guid.NewGuid(),
|
IdentityUserId = newId,
|
||||||
|
|
||||||
UserRoleId = Guid.NewGuid(),
|
UserRoleId = newId,
|
||||||
UserName = $"SiteSurvey_{currentEntity.Email}",
|
UserName = $"SiteSurvey_{currentEntity.Email}",
|
||||||
UserTypeEnum = UserTypeEnum.Undefined,
|
UserTypeEnum = UserTypeEnum.Undefined,
|
||||||
})
|
}),
|
||||||
|
IdentityUserId = newId,
|
||||||
|
UserRoleId = newId
|
||||||
});
|
});
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
@ -776,7 +782,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
.ProjectTo<LoginReturnDTO>(_mapper.ConfigurationProvider, new { isEn_Us = _userInfo.IsEn_Us }).FirstOrDefaultAsync().IfNullThrowException();
|
.ProjectTo<LoginReturnDTO>(_mapper.ConfigurationProvider, new { isEn_Us = _userInfo.IsEn_Us }).FirstOrDefaultAsync().IfNullThrowException();
|
||||||
}
|
}
|
||||||
|
|
||||||
var siteSurveryConfig = _trialRepository.Where(t=>t.Id==trialId).Select(t => t.TrialExtraConfigJsonStr).FirstOrDefault() ?? string.Empty;
|
var siteSurveryConfig = _trialRepository.Where(t => t.Id == trialId).Select(t => t.TrialExtraConfigJsonStr).FirstOrDefault() ?? string.Empty;
|
||||||
|
|
||||||
result.SiteSurveyFiledConfig = JsonConvert.DeserializeObject<TrialExtraConfig>(siteSurveryConfig) ?? new TrialExtraConfig();
|
result.SiteSurveyFiledConfig = JsonConvert.DeserializeObject<TrialExtraConfig>(siteSurveryConfig) ?? new TrialExtraConfig();
|
||||||
return result;
|
return result;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue