Files
zszq-trs/YLErpDAL/Modules/SystemModule/XBondSpreadService.cs
T

51 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 XBondSpread Result { get; private set; }
public void SetXBondSpread(XBondSpread xBondSpread, IYLCache ylCache)
{
if (ylCache.CacheEnable())
{
ylCache.StringSet<XBondSpread>(RedisKey, xBondSpread);
}
else
{
Result = xBondSpread;
}
}
public XBondSpread GetXBondSpread(IYLCache ylCache)
{
if (ylCache.CacheEnable())
{
return ylCache.StringGet<XBondSpread>(RedisKey);
}
else
{
return Result;
}
}
}
public class XBondSpread
{
public int bid { get; set; }
public int ofr { get; set; }
}
}