Commit 28978386 authored by 姜登's avatar 姜登

lastday_data[0].dataValues.cost

parent 782e0507
Pipeline #22326 passed with stage
in 4 seconds
......@@ -116,8 +116,8 @@ class UserService extends Service {
],
where: { user_id, day: last_day },
})
lastday_info.use_amount = lastday_data && lastday_data.get('amount') > 0 ? Number(parseFloat(lastday_data.get('amount')).toFixed(2)) : 0;
lastday_info.use_money = lastday_data && lastday_data.get('cost') > 0 ? Number(parseFloat(lastday_data.get('cost')).toFixed(2)) : 0;
lastday_info.use_amount = lastday_data[0].dataValues.amount > 0 ? Number(parseFloat(lastday_data[0].dataValues.amount).toFixed(2)) : 0;
lastday_info.use_money = lastday_data[0].dataValues.cost > 0 ? Number(parseFloat(lastday_data[0].dataValues.cost).toFixed(2)) : 0;
const left_money = await ctx.dataModel.YzbillBalance.findOne({
attributes: ['balance_fn'],
......
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