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