feat: xbond行情报价添加偏移设置
This commit is contained in:
@@ -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; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user