You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
///-----------------------------------------------------------------------
/// <copyright file="SystemSettingService.cs" company="Origtek">
/// 程式代號: SystemSettingService
/// 程式名稱: SystemSettingService
/// 程式說明:
/// </copyright>
///-----------------------------------------------------------------------
namespace CounsellorBL.BLStructure.SYS { using CounsellorBL.Common; using Microsoft.Extensions.Caching.Memory; using MonumentDefine; using Newtonsoft.Json.Linq; using OT.COM.ArsenalDB; using OT.COM.SignalerMessage; using SoldierData.EnterprizeV4; using System.Collections.Generic;
/// <summary>
/// 類別名稱:SystemSettingService
/// 類別說明:
/// </summary>
public class SystemSettingService : SingleDataTableTemplate<tb_sys_system_setting> { //const string CACHE_KEY_tb_sys_system_setting = "CACHE_KEY_tb_sys_system_setting";
const string CACHE_KEY_tb_sys_system_setting2 = "CACHE_KEY_tb_sys_system_setting2";
[Auth(false)] //public new CResponseMessage Read(CRequestMessage i_crmInput) => base.Read(i_crmInput);
public new CResponseMessage Read(CRequestMessage i_crmInput) { CResponseMessage crmRes = null; IMemoryCache imc = GetMemoryCache();
bool bUseBase = true; try { do { if (getCommonParameter(i_crmInput, BLWording.QRY_MASTER, out JArray jaDataArray, out tb_sys_session sUserSession) != null) { break; } if (jaDataArray.Count != 1 || jaDataArray[0] == null) { break; } JObject joWhere = jaDataArray[0][BLWording.WHEREDATA] as JObject;
if (joWhere == null || joWhere.Count != 0) { break; }
if (imc != null && imc.TryGetValue(CACHE_KEY_tb_sys_system_setting2, out List<tb_sys_system_setting> ul)) { lock (imc) { crmRes = new CSuccessResponseMessage(null, i_crmInput); crmRes.param.Add(BLWording.DATA, ul); bUseBase = false; } } } while (false); } catch { } // 填寫回傳
if (bUseBase) { crmRes = base.Read(i_crmInput); }
return crmRes; } } }
|