Commit 427baed6 authored by 陈涛's avatar 陈涛

计算净值查询结算点前的总份额

parent 37e4867e
......@@ -105,7 +105,8 @@ async def calculate_nav(fund_id, calc_time: datetime.datetime = None, beach_serv
cursor = bill_collect.find(
{
"fund_id": fund_id,
"bill_type": {"$in": ["adjust", "sub", "redemption"]}
"bill_type": {"$in": ["adjust", "sub", "redemption"]},
"record_time": {"$lt": calc_time.replace(minute=0, second=0, microsecond=0).timestamp()}
})
result = await cursor.to_list(length=None)
total_fund_share = sum(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment