增加影像分享配置
continuous-integration/drone/push Build is passing Details

Test_HIR_Net8
hang 2025-09-01 15:12:23 +08:00
parent ed5f8e8d9c
commit 6f8f6000ba
4 changed files with 15 additions and 4 deletions

View File

@ -21,7 +21,7 @@
//"viewEndpoint": "https://hir.test.extimaging.com/oss/hir-test"
"ViewEndpoint": "https://hir-oss.test.extimaging.com/hir-test"
}
},
"ConnectionStrings": {
"RemoteNew": "Server=106.14.89.110,1435;Database=Test_HIR_New;User ID=sa;Password=xc@123456;TrustServerCertificate=true",
@ -41,7 +41,8 @@
//
"IsNeedChangePassWord": true,
//
"ChangePassWordDays": 1000
"ChangePassWordDays": 1000,
"OpenImageShare": true,
},
"SystemEmailSendConfig": {

View File

@ -43,6 +43,8 @@ public class ServiceVerifyConfigOption
public int CmoveInstanceIntervalMinutes { get; set; }
public bool OpenImageShare { get; set; }
}
public class SystemEmailSendConfig
@ -92,6 +94,8 @@ public class SystemEmailSendConfigView
public string CompanyShortNameCN { get; set; } = string.Empty;
public string EmailRegexStr { get; set; }
public bool OpenImageShare { get; set; }
}
public class SystemPacsConfig

View File

@ -5,6 +5,7 @@ using IRaCIS.Core.Application.Contracts.Dicom.DTO;
using IRaCIS.Core.Domain.Share;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System.Windows.Input;
namespace IRaCIS.Core.Application.Services
{
@ -27,6 +28,7 @@ namespace IRaCIS.Core.Application.Services
var addEntity = await _imageShareRepository.AddAsync(imageShare);
addEntity.ExpireTime = DateTime.Now.AddDays(7);
//验证码 4位
int verificationPassWord = new Random().Next(1000, 10000);
@ -36,7 +38,7 @@ namespace IRaCIS.Core.Application.Services
var success = await _imageShareRepository.SaveChangesAsync();
return ResponseOutput.Result(success, new { ResourceId = imageShare.Id, Password = verificationPassWord.ToString() });
return ResponseOutput.Result(success, new { ResourceId = imageShare.Id, Password = verificationPassWord.ToString(), ImageShareExpireDays = 7 });
}

View File

@ -1125,7 +1125,8 @@ namespace IRaCIS.Core.Application.Service
[HttpPost]
public async Task<IResponseOutput<IRCLoginReturnDTO>> GetUserLoginRoleList(IRCLoginDto loginDto,
[FromServices] ITokenService _tokenService,
[FromServices] IOptionsMonitor<SystemEmailSendConfig> _emailConfig
[FromServices] IOptionsMonitor<SystemEmailSendConfig> _emailConfig,
[FromServices] IOptionsMonitor<ServiceVerifyConfigOption> _basicSystemConfigConfig
)
{
@ -1133,7 +1134,10 @@ namespace IRaCIS.Core.Application.Service
var password = loginDto.Password;
var emailConfig = _emailConfig.CurrentValue;
var basicConfig = _basicSystemConfigConfig.CurrentValue;
var companyInfo = new SystemEmailSendConfigView() { CompanyName = emailConfig.CompanyName, CompanyNameCN = emailConfig.CompanyNameCN, CompanyShortName = emailConfig.CompanyShortName, CompanyShortNameCN = emailConfig.CompanyShortNameCN, SystemShortName = emailConfig.SystemShortName, EmailRegexStr = emailConfig.EmailRegexStr };
companyInfo.OpenImageShare = basicConfig.OpenImageShare;
int maxFailures = _verifyConfig.CurrentValue.LoginMaxFailCount;