using BaseOUDAL; using YLErp.Cache; namespace YLErp.Modules.SystemModule { /// /// XBond偏移设置(净价) /// public class XBondSpreadService : BaseService { 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(RedisKey, xBondSpread); } else { Result = xBondSpread; } } public XBondSpread GetXBondSpread(IYLCache ylCache) { if (ylCache.CacheEnable()) { return ylCache.StringGet(RedisKey); } else { return Result; } } } public class XBondSpread { public int bid { get; set; } public int ofr { get; set; } } }