diff --git a/src/modules/fund/fund.controller.js b/src/modules/fund/fund.controller.js index b48df50..79b334f 100644 --- a/src/modules/fund/fund.controller.js +++ b/src/modules/fund/fund.controller.js @@ -246,7 +246,7 @@ module.exports = { } }); } - const [newFund, actions] = await Promise.all([ + let [newFund, actions] = await Promise.all([ fund.addFund(list, { inviter }), Action.find({ userId, type: 1, createdAt: { $gt: start, $lt: now } }) ]); @@ -254,6 +254,7 @@ module.exports = { let revenueLastday = calRevenueLastday(actions); // 筛选有效矿晶 let activeFund = getActiveFund(fund.fundList); + if (!newFund || !newFund.fundList) newFund = fund; return res.json({ code: 0, msg: '刷新成功',