|
|
|
@ -1,5 +1,6 @@ |
|
|
|
|
using Microsoft.AspNetCore.Mvc; |
|
|
|
|
using Microsoft.Extensions.Logging; |
|
|
|
|
using Mysqlx.Expr; |
|
|
|
|
using System.Text.RegularExpressions; |
|
|
|
|
|
|
|
|
|
namespace Tiobon.Core.Services; |
|
|
|
@ -8,10 +9,12 @@ public partial class CommonServices : BaseServices<RootEntityTkey<int>>, ICommon |
|
|
|
|
{ |
|
|
|
|
IHttpContextAccessor _httpContextAccessor; |
|
|
|
|
ILogger<PayServices> _logger; |
|
|
|
|
public CommonServices(ILogger<PayServices> logger, IHttpContextAccessor httpContextAccessor) |
|
|
|
|
public ICaching _caching; |
|
|
|
|
public CommonServices(ILogger<PayServices> logger, IHttpContextAccessor httpContextAccessor, ICaching caching = null) |
|
|
|
|
{ |
|
|
|
|
_logger = logger; |
|
|
|
|
_httpContextAccessor = httpContextAccessor; |
|
|
|
|
_caching = caching; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#region 获取菜单 |
|
|
|
@ -1953,6 +1956,8 @@ public partial class CommonServices : BaseServices<RootEntityTkey<int>>, ICommon |
|
|
|
|
|
|
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
result.DT_PageMutiMsg = await _caching.GetAsync<List<DT_PageMutiMsg>>(param.menuName + "_DT_PageMutiMsg"); |
|
|
|
|
|
|
|
|
|
#region 多语返回处理 |
|
|
|
|
if (param.menuName == "F_ResumeMaintenance_All" || |
|
|
|
|
param.menuName == "F_ResumeMaintenance_Process" || |
|
|
|
@ -1986,7 +1991,11 @@ public partial class CommonServices : BaseServices<RootEntityTkey<int>>, ICommon |
|
|
|
|
} |
|
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
if (result.DT_PageMutiMsg is null) |
|
|
|
|
{ |
|
|
|
|
result.DT_PageMutiMsg = Db.Ado.SqlQuery<DT_PageMutiMsg>(sqlLang); |
|
|
|
|
await _caching.SetAsync(param.menuName + "_DT_PageMutiMsg", result.DT_PageMutiMsg, TimeSpan.FromMinutes(5)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return new ServiceResult<ModuleReturn>() { Success = true, Message = "查询成功", Data = result, }; |
|
|
|
|
} |
|
|
|
|