fix: activeFund
This commit is contained in:
@@ -243,7 +243,7 @@ module.exports = {
|
|||||||
let revenueLastday = calRevenueLastday(actions);
|
let revenueLastday = calRevenueLastday(actions);
|
||||||
// 筛选有效矿晶
|
// 筛选有效矿晶
|
||||||
// let activeFund = getActiveFund(fund.fundList);
|
// 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;
|
let revenueAll = Array.isArray(allAction) && allAction.reduce((pre, cur) => pre + (+cur.amount || 0), 0) || 0;
|
||||||
revenueAll = revenueAll.toFixed(4);
|
revenueAll = revenueAll.toFixed(4);
|
||||||
return res.json({
|
return res.json({
|
||||||
@@ -267,7 +267,7 @@ module.exports = {
|
|||||||
let revenueLastday = calRevenueLastday(actions);
|
let revenueLastday = calRevenueLastday(actions);
|
||||||
// 筛选有效矿晶
|
// 筛选有效矿晶
|
||||||
// let activeFund = getActiveFund(fund.fundList);
|
// let activeFund = getActiveFund(fund.fundList);
|
||||||
let activeFund = fund.fundList;
|
let activeFund = fund.vicFundSum;
|
||||||
if (!newFund || !newFund.fundList) newFund = fund;
|
if (!newFund || !newFund.fundList) newFund = fund;
|
||||||
let revenueAll = Array.isArray(allAction) && allAction.reduce((pre, cur) => pre + (+cur.amount || 0), 0) || 0;
|
let revenueAll = Array.isArray(allAction) && allAction.reduce((pre, cur) => pre + (+cur.amount || 0), 0) || 0;
|
||||||
revenueAll = revenueAll.toFixed(4);
|
revenueAll = revenueAll.toFixed(4);
|
||||||
@@ -306,7 +306,7 @@ module.exports = {
|
|||||||
let now = new Date();
|
let now = new Date();
|
||||||
// 筛选有效矿晶
|
// 筛选有效矿晶
|
||||||
// let activeFund = getActiveFund(fund.fundList);
|
// 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 actions = await Action.find({ userId, type: 1, createdAt: { $gt: start, $lt: now } }).exec();
|
||||||
const allAction = await Action.find({ userId, type: 1 }).exec();
|
const allAction = await Action.find({ userId, type: 1 }).exec();
|
||||||
// 计算昨日收益
|
// 计算昨日收益
|
||||||
|
|||||||
Reference in New Issue
Block a user