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 { ...@@ -118,7 +118,8 @@ class UserService extends Service {
attributes: ['balance_fn'], attributes: ['balance_fn'],
where: { user_id, month: last_month }, 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 detail = []
const bill = await ctx.dataModel.YzbillBalance.findAll({ const bill = await ctx.dataModel.YzbillBalance.findAll({
...@@ -128,12 +129,12 @@ class UserService extends Service { ...@@ -128,12 +129,12 @@ class UserService extends Service {
}) })
for (let i = 0; i < bill.length; i++) { for (let i = 0; i < bill.length; i++) {
detail.push({ detail.push({
name:bill[i].company, name: bill[i].company,
date:bill[i].month, date: bill[i].month,
start_left:bill[i].balance_bg, start_left: bill[i].balance_bg,
middle_recharge:bill[i].recharge_m, middle_recharge: bill[i].recharge_m,
middlefee:bill[i].cost_m, middlefee: bill[i].cost_m,
endfee:bill[i].balance_fn, 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