编码格式修复

This commit is contained in:
吴方海
2025-09-09 13:08:13 +08:00
parent eb4a51110e
commit 3e9f34e739
@@ -69,7 +69,7 @@ namespace YLErp.Modules.DataCacheModule
}
}
public string GetStr(string key, string template = "默认")
public string GetStr(string key, string template = "默认")
{
if (string.IsNullOrEmpty(key))
{
@@ -93,7 +93,7 @@ namespace YLErp.Modules.DataCacheModule
}
}
public void UpdateObj(string key, string value, string template = "默认")
public void UpdateObj(string key, string value, string template = "默认")
{
if (string.IsNullOrEmpty(key))
{
@@ -121,7 +121,7 @@ namespace YLErp.Modules.DataCacheModule
/// <typeparam name="T">Type</typeparam>
/// <param name="key">The key of the value to get.</param>
/// <returns>The value associated with the specified key.</returns>
public virtual T Get<T>(string key, string template = "默认") where T : new()
public virtual T Get<T>(string key, string template = "默认") where T : new()
{
if (!string.IsNullOrEmpty(key) && CacheDic.TryGetValue(key + template, out CacheTable ca))
{
@@ -136,7 +136,7 @@ namespace YLErp.Modules.DataCacheModule
/// <param name="key">key</param>
/// <param name="data">Data</param>
/// <param name="cacheTime">Cache time</param>
public virtual void Set(string key, object data, int cacheTime = CacheTimeout, string template = "默认")
public virtual void Set(string key, object data, int cacheTime = CacheTimeout, string template = "默认")
{
if (string.IsNullOrEmpty(key) || data == null)
{
@@ -180,7 +180,7 @@ namespace YLErp.Modules.DataCacheModule
/// </summary>
/// <param name="key">key</param>
/// <returns>Result</returns>
public virtual bool IsSet(string key, string template = "默认")
public virtual bool IsSet(string key, string template = "默认")
{
return !string.IsNullOrEmpty(key + template) && CacheDic.ContainsKey(key + template);
}
@@ -189,7 +189,7 @@ namespace YLErp.Modules.DataCacheModule
/// Removes the value with the specified key from the cache
/// </summary>
/// <param name="key">/key</param>
public virtual void Remove(string key, string template = "默认")
public virtual void Remove(string key, string template = "默认")
{
if (string.IsNullOrEmpty(key))
{
@@ -214,11 +214,11 @@ namespace YLErp.Modules.DataCacheModule
List<string> fliterList = new List<string>();
switch (reportType)
{
case "交易明细": fliterList = TradeDetailReport; break;
case "互换明细": fliterList = TradeSwapDetailReport; break;
case "结算报告": fliterList = ClientBalanceReport; break;
case "交易明细": fliterList = TradeDetailReport; break;
case "互换明细": fliterList = TradeSwapDetailReport; break;
case "结算报告": fliterList = ClientBalanceReport; break;
default:
throw new ServiceException("错误的报告类型");
throw new ServiceException("错误的报告类型");
}
using (ErpBaseContext db = new ErpBaseContext())
{
@@ -231,11 +231,11 @@ namespace YLErp.Modules.DataCacheModule
List<string> fliterList = new List<string>();
switch (reportType)
{
case "交易明细": fliterList = TradeDetailReport; break;
case "互换明细": fliterList = TradeSwapDetailReport; break;
case "结算报告": fliterList = ClientBalanceReport; break;
case "交易明细": fliterList = TradeDetailReport; break;
case "互换明细": fliterList = TradeSwapDetailReport; break;
case "结算报告": fliterList = ClientBalanceReport; break;
default:
throw new ServiceException("错误的报告类型");
throw new ServiceException("错误的报告类型");
}
using (ErpBaseContext db = new ErpBaseContext())
{
@@ -247,7 +247,7 @@ namespace YLErp.Modules.DataCacheModule
}
else
{
throw new ServiceException("不存在 " + needDel + " 模板");
throw new ServiceException("不存在 " + needDel + " 模板");
}
}
}