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 Details

Test_IRC_Net8
he 2026-02-02 13:24:03 +08:00
commit 9a52e30172
3 changed files with 29 additions and 34 deletions

View File

@ -205,19 +205,25 @@ namespace IRaCIS.Core.SCP.Service
var _SCPImageUploadRepository = _serviceProvider.GetService<IRepository<SCPImageUpload>>(); var _SCPImageUploadRepository = _serviceProvider.GetService<IRepository<SCPImageUpload>>();
_upload.EndTime = DateTime.Now; //有时候没有建立连接会走关闭通过日志发现
_upload.StudyCount = _ImageUploadList.Count; if (_upload != null)
_upload.TrialId = _trialId;
_upload.TrialSiteId = _trialSiteId;
_upload.UploadJsonStr = (new SCPImageLog() { UploadList = _ImageUploadList }).ToJsonStr();
//可能是测试echo 导致记录了
if (_upload.FileCount > 0)
{ {
_upload.EndTime = DateTime.Now;
_upload.StudyCount = _ImageUploadList.Count;
_upload.TrialId = _trialId;
_upload.TrialSiteId = _trialSiteId;
_upload.UploadJsonStr = (new SCPImageLog() { UploadList = _ImageUploadList }).ToJsonStr();
//可能是测试echo 导致记录了 //可能是测试echo 导致记录了
await _SCPImageUploadRepository.AddAsync(_upload, true); if (_upload.FileCount > 0)
{
//可能是测试echo 导致记录了
await _SCPImageUploadRepository.AddAsync(_upload, true);
}
} }
} }

View File

@ -1000,14 +1000,6 @@ namespace IRaCIS.Core.Application.Service
var userLog = new UserLog(); var userLog = new UserLog();
if (failCount >= maxFailures)
{
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionUserName = userName, LoginPassword = password, OptType = UserOptType.TempLockLogin }, true);
//$"密码连续错误{maxFailures}次,当前账号已被限制登录,请等待 {lockoutMinutes} 分钟后再试。"
throw new BusinessValidationFailedException(_localizer["User_ErrorLimit", maxFailures, lockoutMinutes]);
}
var userLoginReturnModel = new IRCLoginReturnDTO(); var userLoginReturnModel = new IRCLoginReturnDTO();
@ -1019,7 +1011,7 @@ namespace IRaCIS.Core.Application.Service
var isLoginUncommonly = false; var isLoginUncommonly = false;
#region //登录用户是系统用户的时候,就要要记录异地登录 #region 登录用户是系统用户的时候,就要要记录异地登录
//账号在系统存在 //账号在系统存在
if (isExistAccount || loginUser != null) if (isExistAccount || loginUser != null)
@ -1093,6 +1085,14 @@ namespace IRaCIS.Core.Application.Service
//错误次数累加 //错误次数累加
failCount++; failCount++;
if (failCount >= maxFailures)
{
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionUserName = userName, LoginPassword = password, OptType = UserOptType.TempLockLogin }, true);
//$"密码连续错误{maxFailures}次,当前账号已被限制登录,请等待 {lockoutMinutes} 分钟后再试。"
throw new BusinessValidationFailedException(_localizer["User_ErrorLimit", maxFailures, lockoutMinutes]);
}
await _fusionCache.SetAsync(cacheKey, failCount, TimeSpan.FromMinutes(lockoutMinutes)); await _fusionCache.SetAsync(cacheKey, failCount, TimeSpan.FromMinutes(lockoutMinutes));
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionUserName = userName, LoginPassword = password, OptType = UserOptType.AccountOrPasswordError, IsLoginUncommonly = isLoginUncommonly }, true); await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionUserName = userName, LoginPassword = password, OptType = UserOptType.AccountOrPasswordError, IsLoginUncommonly = isLoginUncommonly }, true);

View File

@ -18,8 +18,7 @@ server:
steps: steps:
- name: build-uat-irc - name: build-uat-irc
commands: commands:
- cd /opt/1panel/xc-deploy/Uat_IRC/devops-build-publish/Uat-To-Uat - bash /opt/1panel/xc-deploy-new/Uat_IRC/devops-publish/uat-branch-publish.sh
- sh uat-branch-latest-build-image-publish.sh v${DRONE_BUILD_NUMBER}
trigger: trigger:
branch: branch:
@ -46,12 +45,7 @@ server:
steps: steps:
- name: publish-test-irc - name: publish-test-irc
commands: commands:
- cd /opt/1panel/xc-deploy/Test_IRC/devops-build-publish;sh test-irc-update-or-create-stack.sh v${DRONE_BUILD_NUMBER} - bash /opt/1panel/xc-deploy-new/Test_IRC_Swarm/devops-publish/test-branch-publish.sh
- name: publish-test-irc-scp
commands:
- cd /opt/1panel/xc-deploy/Test_IRC_SCP/devops-build-publish;sh pull-build-test-irc-scp-image.sh v${DRONE_BUILD_NUMBER}
- cd /opt/1panel/xc-deploy/Test_IRC_SCP ;sh update-image-if-need-then-pull-aliyun.sh v${DRONE_BUILD_NUMBER}
trigger: trigger:
branch: branch:
@ -108,13 +102,8 @@ server:
steps: steps:
- name: publish-test-hir - name: publish-test-hir
commands: commands:
- cd /opt/1panel/xc-deploy/Test_HIR/devops-build-publish;sh pull-build-test-hir-image.sh v${DRONE_BUILD_NUMBER} - bash /opt/1panel/xc-deploy-new/Test_HIR/devops-publish/test-branch-publish.sh
- cd /opt/1panel/xc-deploy/Test_HIR ; sh update-image-if-need-then-pull-aliyun.sh v${DRONE_BUILD_NUMBER}
- name: publish-test-hir-scp
commands:
- cd /opt/1panel/xc-deploy/Test_HIR_SCP/devops-build-publish;sh pull-build-test-hir-scp-image.sh v${DRONE_BUILD_NUMBER}
- cd /opt/1panel/xc-deploy/Test_HIR_SCP ;sh update-image-if-need-then-pull-aliyun.sh v${DRONE_BUILD_NUMBER}
trigger: trigger:
branch: branch:
- Test_HIR - Test_HIR