Commit 782e0507 authored by 姜登's avatar 姜登

lastday_data.get('amount')

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