Commit ed2914f7 authored by 姜登's avatar 姜登

left_money.balance_fn

parent 009930ac
Pipeline #21977 passed with stage
in 2 seconds
......@@ -118,7 +118,8 @@ class UserService extends Service {
attributes: ['balance_fn'],
where: { user_id, month: last_month },
})
lastday_info.left_money = left_money.balance_fn || 0;
lastday_info.left_money = left_money && left_money.balance_fn ? left_money.balance_fn : 0;
const detail = []
const bill = await ctx.dataModel.YzbillBalance.findAll({
......@@ -128,12 +129,12 @@ class UserService extends Service {
})
for (let i = 0; i < bill.length; i++) {
detail.push({
name:bill[i].company,
date:bill[i].month,
start_left:bill[i].balance_bg,
middle_recharge:bill[i].recharge_m,
middlefee:bill[i].cost_m,
endfee:bill[i].balance_fn,
name: bill[i].company,
date: bill[i].month,
start_left: bill[i].balance_bg,
middle_recharge: bill[i].recharge_m,
middlefee: bill[i].cost_m,
endfee: bill[i].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