Commit 0237f14f authored by 姜登's avatar 姜登

home

parent ef53fe4e
Pipeline #21974 passed with stage
in 2 seconds
......@@ -104,7 +104,7 @@ class UserService extends Service {
const last_day = moment(new Date()).subtract(1, 'day').format('YYYY-MM-DD');
const last_month = moment(new Date()).subtract(1, 'day').format('YYYYMM');
const lastday_data = await ctx.dataModel.YzBillCost.findOne({
const lastday_data = await ctx.dataModel.YzbillCost.findOne({
attributes: [
[ctx.model.fn('SUM', 'pull_volumn'), 'amount'],
[ctx.model.fn('SUM', 'cost'), 'cost'],
......@@ -114,14 +114,14 @@ class UserService extends Service {
lastday_info.use_amount = lastday_data.amount || 0;
lastday_info.use_money = lastday_data.cost || 0;
const left_money = await ctx.dataModel.YzBillBalance.findOne({
const left_money = await ctx.dataModel.YzbillBalance.findOne({
attributes: ['balance_fn'],
where: { user_id, month: last_month },
})
lastday_info.left_money = left_money.balance_fn || 0;
const detail = []
const bill = await ctx.dataModel.YzBillBalance.findAll({
const bill = await ctx.dataModel.YzbillBalance.findAll({
attributes: ['month', 'company', 'balance_bg', 'recharge_m', 'cost_m', 'balance_fn'],
where: { user_id },
order: [['month', 'DESC']],
......
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