feat: xbond行情报价添加偏移设置

This commit is contained in:
zheng.zhang
2025-12-17 19:54:34 +08:00
parent 6b4e4a2d8e
commit 5110d008b4
5 changed files with 420 additions and 219 deletions
@@ -0,0 +1,50 @@
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; }
}
}