From 460588a342a0d3033fe4716dd7b50e3fa64fbccc Mon Sep 17 00:00:00 2001 From: chaosBreaking Date: Sat, 26 Oct 2019 17:35:15 +0800 Subject: [PATCH] fix: activeFund --- src/modules/fund/fund.controller.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/fund/fund.controller.js b/src/modules/fund/fund.controller.js index 34727de..167d6dd 100644 --- a/src/modules/fund/fund.controller.js +++ b/src/modules/fund/fund.controller.js @@ -243,7 +243,7 @@ module.exports = { let revenueLastday = calRevenueLastday(actions); // 筛选有效矿晶 // let activeFund = getActiveFund(fund.fundList); - let activeFund = fund.fundList; + let activeFund = fund.vicFundSum; let revenueAll = Array.isArray(allAction) && allAction.reduce((pre, cur) => pre + (+cur.amount || 0), 0) || 0; revenueAll = revenueAll.toFixed(4); return res.json({ @@ -267,7 +267,7 @@ module.exports = { let revenueLastday = calRevenueLastday(actions); // 筛选有效矿晶 // let activeFund = getActiveFund(fund.fundList); - let activeFund = fund.fundList; + let activeFund = fund.vicFundSum; if (!newFund || !newFund.fundList) newFund = fund; let revenueAll = Array.isArray(allAction) && allAction.reduce((pre, cur) => pre + (+cur.amount || 0), 0) || 0; revenueAll = revenueAll.toFixed(4); @@ -306,7 +306,7 @@ module.exports = { let now = new Date(); // 筛选有效矿晶 // let activeFund = getActiveFund(fund.fundList); - let activeFund = fund.fundList; + let activeFund = fund.vicFundSum; const actions = await Action.find({ userId, type: 1, createdAt: { $gt: start, $lt: now } }).exec(); const allAction = await Action.find({ userId, type: 1 }).exec(); // 计算昨日收益