Files
zszq-trs/YLErpDAL/Modules/SystemModule/XBondSpreadService.cs
T
2025-12-18 10:57:17 +08:00

49 lines
1.1 KiB
C#

using BaseOUDAL;
using YLErp.Cache;
namespace YLErp.Modules.SystemModule
{
/// <summary>
/// XBond偏移设置(净价)
/// </summary>
public class XBondSpreadService : BaseService<ErpBaseContext>
{
private const string RedisKey = "md:netprice:spread";
public XBondSpreadService()
{
}
public void SetXBondSpread(XBondSpread xBondSpread, IYLCache ylCache)
{
try
{
ylCache.StringSetWithNoPrefix<XBondSpread>(RedisKey, xBondSpread, null);
}
catch(Exception)
{
throw new Exception("偏移设置保存失败");
}
}
public XBondSpread GetXBondSpread(IYLCache ylCache)
{
try
{
return ylCache.StringGetWithNoPrefix<XBondSpread>(RedisKey);
}
catch(Exception)
{
throw new Exception("偏移设置获取失败");
}
}
}
public class XBondSpread
{
public int bid { get; set; }
public int ofr { get; set; }
}
}