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:
@@ -123,14 +123,19 @@ public class TrialResourceFilter : Attribute, IAsyncResourceFilter
|
||||
|
||||
if (string.IsNullOrWhiteSpace(trialStatusStr))
|
||||
{
|
||||
|
||||
//数据库 检查该项目Id不对
|
||||
context.Result = new JsonResult(ResponseOutput.NotOk(_localizer["TrialResource_ReferTrialIdFailed"]));
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//---正则取请求Refer 中trialId 失败,请联系开发人员核查
|
||||
context.Result = new JsonResult(ResponseOutput.NotOk(_localizer["TrialResource_ReferTrialIdFailed"]));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//使用字符串取 如果是swagger 可能有时取的不对 因为空格的原因
|
||||
|
||||
@@ -59,6 +59,8 @@ public class SystemEmailSendConfig
|
||||
public string CompanyShortName { get; set; } = string.Empty;
|
||||
|
||||
public string CompanyShortNameCN { get; set; } = string.Empty;
|
||||
|
||||
public string IsEnv_US { get; set; }
|
||||
}
|
||||
|
||||
public class SystemEmailSendConfigView
|
||||
|
||||
@@ -13,6 +13,8 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
public Guid CreateUserId { get; set; }
|
||||
public Guid UpdateUserId { get; set; }
|
||||
public DateTime UpdateTime { get; set; }
|
||||
|
||||
public string IsEnv_US { get; set; }
|
||||
}
|
||||
|
||||
///<summary>PublishLogQuery 列表查询参数模型</summary>
|
||||
@@ -32,6 +34,8 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
{
|
||||
public Guid? Id { get; set; }
|
||||
public string Version { get; set; }
|
||||
|
||||
public string Version_US { get; set; }
|
||||
public DateTime? PublishTime { get; set; }
|
||||
public string UpdateContent { get; set; }
|
||||
|
||||
@@ -47,6 +51,7 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Version { get; set; }
|
||||
public string Version_US { get; set; }
|
||||
public int State { get; set; }
|
||||
public DateTime? PublishTime { get; set; }
|
||||
public bool IsCurrentVersion { get; set; }
|
||||
|
||||
@@ -6,8 +6,10 @@
|
||||
|
||||
using IRaCIS.Core.Application.Interfaces;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
@@ -40,7 +42,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
Version version;
|
||||
|
||||
if (!Version.TryParse(addOrEditPublishLog.Version, out version))
|
||||
if (!Version.TryParse(addOrEditPublishLog.Version, out version)|| !Version.TryParse(addOrEditPublishLog.Version_US, out version))
|
||||
{
|
||||
//"版本号不符合要求"
|
||||
return ResponseOutput.NotOk(_localizer["PublishLog_NotValidVersion"]);
|
||||
@@ -48,7 +50,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
var verifyExp1 = new EntityVerifyExp<PublishLog>()
|
||||
{
|
||||
VerifyExp = u => u.Version == addOrEditPublishLog.Version,
|
||||
VerifyExp = u => u.Version == addOrEditPublishLog.Version || u.Version_US == addOrEditPublishLog.Version_US,
|
||||
|
||||
//"发布编号不能重复"
|
||||
VerifyMsg = _localizer["PublishLog_RepeatVersion"]
|
||||
@@ -79,7 +81,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
}
|
||||
|
||||
[AllowAnonymous]
|
||||
public async Task<PublishLogView> GetCurrentPublishInfo()
|
||||
public async Task<PublishLogView> GetCurrentPublishInfo([FromServices] IOptionsMonitor<SystemEmailSendConfig> _sysEmialConfigOPtion)
|
||||
{
|
||||
var result = await _publishLogRepository.Where(t => t.IsCurrentVersion == true).ProjectTo<PublishLogView>(_mapper.ConfigurationProvider).FirstOrDefaultAsync();
|
||||
|
||||
@@ -89,6 +91,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
throw new QueryBusinessObjectNotExistException(_localizer["PublishLog_NoCurrentVersion"]);
|
||||
}
|
||||
|
||||
result.IsEnv_US = _sysEmialConfigOPtion.CurrentValue.IsEnv_US;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -183,7 +183,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
await VerifyUserEmailAsync(_userInfo.Id, _userInfo.UserTypeId, newEmail);
|
||||
|
||||
|
||||
await _userRepository.UpdatePartialNowNoQueryAsync(_userInfo.Id, u => new User()
|
||||
await _userRepository.UpdatePartialFromQueryAsync(_userInfo.Id, u => new User()
|
||||
{
|
||||
EMail = newEmail
|
||||
});
|
||||
@@ -206,7 +206,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
await VerifyUserPhoneAsync(_userInfo.Id, _userInfo.UserTypeId, newPhone);
|
||||
|
||||
await _userRepository.UpdatePartialNowNoQueryAsync(_userInfo.Id, u => new User()
|
||||
await _userRepository.UpdatePartialFromQueryAsync(_userInfo.Id, u => new User()
|
||||
{
|
||||
Phone = newPhone
|
||||
});
|
||||
@@ -223,7 +223,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
await VerifyUserNameAsync(_userInfo.Id, newUserName);
|
||||
|
||||
|
||||
await _userRepository.UpdatePartialNowNoQueryAsync(_userInfo.Id, u => new User()
|
||||
await _userRepository.UpdatePartialFromQueryAsync(_userInfo.Id, u => new User()
|
||||
{
|
||||
UserName = newUserName
|
||||
});
|
||||
@@ -277,7 +277,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
await _mailVerificationService.AdminResetPwdSendEmailAsync(userId, pwd);
|
||||
|
||||
await _userRepository.UpdatePartialNowNoQueryAsync(userId, u => new User()
|
||||
await _userRepository.UpdatePartialFromQueryAsync(userId, u => new User()
|
||||
{
|
||||
Password = MD5Helper.Md5(pwd),
|
||||
IsFirstAdd = true
|
||||
|
||||
@@ -101,7 +101,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> SetAutoCutNextTask(SetAutoCutNextTaskInDto inDto)
|
||||
{
|
||||
await _userRepository.UpdatePartialNowNoQueryAsync(_userInfo.Id, x => new User()
|
||||
await _userRepository.UpdatePartialFromQueryAsync(_userInfo.Id, x => new User()
|
||||
{
|
||||
|
||||
AutoCutNextTask = inDto.AutoCutNextTask
|
||||
|
||||
Reference in New Issue
Block a user