Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -350,7 +350,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
//---[来自展影IRC] 关于创建账户的提醒
|
||||
|
||||
|
||||
var token = _tokenService.GetToken(IRaCISClaims.Create(_mapper.Map<UserBasicInfo>(sysUserInfo)));
|
||||
var token = _tokenService.GetToken(new UserTokenInfo() { UserRoleId = sysUserInfo.Id });
|
||||
|
||||
await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == sysUserInfo.Id, u => new User() { EmailToken = token });
|
||||
|
||||
@@ -438,7 +438,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
// $"[来自展影IRC] [{trialInfo.ResearchProgramNo}]邀请信";
|
||||
|
||||
|
||||
var token = _tokenService.GetToken(IRaCISClaims.Create(_mapper.Map<UserBasicInfo>(sysUserInfo)));
|
||||
var token = _tokenService.GetToken(new UserTokenInfo() { UserRoleId = sysUserInfo.Id });
|
||||
|
||||
if (sysUserInfo.IsFirstAdd)
|
||||
{
|
||||
@@ -499,7 +499,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
|
||||
|
||||
var token = _tokenService.GetToken(IRaCISClaims.Create(_mapper.Map<UserBasicInfo>(sysUserInfo)));
|
||||
var token = _tokenService.GetToken(new UserTokenInfo() { UserRoleId = sysUserInfo.Id });
|
||||
if (sysUserInfo.IsFirstAdd)
|
||||
{
|
||||
await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == sysUserInfo.Id, u => new User() { EmailToken = token });
|
||||
@@ -607,13 +607,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
|
||||
|
||||
var basicInfo = IRaCISClaims.Create(_mapper.Map<UserBasicInfo>(sysUserInfo));
|
||||
|
||||
////第一次添加的时候 注意赋值
|
||||
//basicInfo.PermissionStr = userType.PermissionStr;
|
||||
//basicInfo.UserTypeShortName = userType.UserTypeShortName;
|
||||
|
||||
var token = _tokenService.GetToken(basicInfo);
|
||||
var token = _tokenService.GetToken(new UserTokenInfo() { UserRoleId = sysUserInfo.Id });
|
||||
|
||||
if (sysUserInfo.IsFirstAdd)
|
||||
{
|
||||
|
||||
@@ -102,18 +102,13 @@ namespace IRaCIS.Core.Application.Services
|
||||
var resource = new ResourceInfo()
|
||||
{
|
||||
StudyId = imageShare.StudyId,
|
||||
Token = _tokenService.GetToken(IRaCISClaims.Create(new UserBasicInfo()
|
||||
Token = _tokenService.GetToken(new UserTokenInfo()
|
||||
{
|
||||
Id = Guid.Empty,
|
||||
IsReviewer = false,
|
||||
IsAdmin = false,
|
||||
RealName = "Share001",
|
||||
UserRoleId = Guid.NewGuid(),
|
||||
FullName = "Share001",
|
||||
UserName = "Share001",
|
||||
Sex = 0,
|
||||
//UserType = "ShareType",
|
||||
UserTypeEnum = UserTypeEnum.ShareImage,
|
||||
Code = "ShareCode001",
|
||||
}))
|
||||
})
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -21,7 +21,34 @@ namespace IRaCIS.Application.Contracts
|
||||
|
||||
public Guid? UserId { get; set; }
|
||||
}
|
||||
public class IRCLoginDto
|
||||
{
|
||||
public string UserName { get; set; }
|
||||
public string Password { get; set; }
|
||||
}
|
||||
public class LoginSelectRoleReturn
|
||||
{
|
||||
public string JwtStr { get; set; }
|
||||
|
||||
public bool IsExistMutiAccount => AccountList.Count > 1;
|
||||
|
||||
public List<UserAccountInfo> AccountList { get; set; } = new List<UserAccountInfo>();
|
||||
}
|
||||
|
||||
public class UserAccountInfo
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string UserName { get; set; } = string.Empty;
|
||||
public string FullName { get; set; } = string.Empty;
|
||||
|
||||
public string Phone { get; set; } = string.Empty;
|
||||
public string EMail { get; set; } = string.Empty;
|
||||
|
||||
public Guid UserTypeId { get; set; }
|
||||
|
||||
public UserTypeEnum UserType { get; set; }
|
||||
|
||||
}
|
||||
public class LoginReturnDTO
|
||||
{
|
||||
public UserBasicInfo BasicInfo { get; set; } = new UserBasicInfo();
|
||||
|
||||
@@ -142,7 +142,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
//验证码 6位
|
||||
int verificationCode = new Random().Next(100000, 1000000);
|
||||
|
||||
await _mailVerificationService.SendMailEditEmail(_userInfo.Id, _userInfo.RealName, email, verificationCode);
|
||||
await _mailVerificationService.SendMailEditEmail(_userInfo.Id, _userInfo.FullName, email, verificationCode);
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using AutoMapper;
|
||||
using AutoMapper.EquivalencyExpression;
|
||||
using IRaCIS.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Auth;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
@@ -136,6 +137,10 @@ namespace IRaCIS.Core.Application.Service
|
||||
;
|
||||
|
||||
CreateMap<UserFeedBackAddOrEdit, UserFeedBack>().ReverseMap();
|
||||
|
||||
CreateMap<UserBasicInfo, UserTokenInfo>()
|
||||
.ForMember(d => d.UserRoleId, c => c.MapFrom(t => t.Id));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1938,7 +1938,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
|
||||
qcChallenge.ReUploadUserId = _userInfo.Id;
|
||||
|
||||
qcChallenge.ReUploader = _userInfo.RealName;
|
||||
qcChallenge.ReUploader = _userInfo.FullName;
|
||||
|
||||
qcChallenge.LatestMsgTime = DateTime.Now;
|
||||
|
||||
|
||||
@@ -236,7 +236,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
result.ReviewStatus = info.ReviewStatus;
|
||||
}
|
||||
|
||||
result.Token = _tokenService.GetToken(IRaCISClaims.Create(new UserBasicInfo() { Id = Guid.NewGuid() }));
|
||||
result.Token = _tokenService.GetToken(new UserTokenInfo() { UserRoleId = Guid.NewGuid() });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -441,18 +441,12 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
return ResponseOutput.Ok(new
|
||||
{
|
||||
TrialSiteSurveyId = currentEntity!.Id,
|
||||
Token = _tokenService.GetToken(IRaCISClaims.Create(new UserBasicInfo()
|
||||
Token = _tokenService.GetToken(new UserTokenInfo()
|
||||
{
|
||||
Id = Guid.NewGuid(),
|
||||
IsReviewer = false,
|
||||
IsAdmin = false,
|
||||
RealName = "SiteSurvey",
|
||||
UserRoleId = Guid.NewGuid(),
|
||||
UserName = "SiteSurvey",
|
||||
Sex = 0,
|
||||
//UserType = "ShareType",
|
||||
UserTypeEnum = UserTypeEnum.Undefined,
|
||||
Code = "SiteSurvey",
|
||||
}))
|
||||
})
|
||||
});
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user