Commit 4369a7eb authored by 姜登's avatar 姜登

fn

parent 6d00090a
Pipeline #22317 passed with stage
in 3 seconds
...@@ -111,8 +111,8 @@ class UserService extends Service { ...@@ -111,8 +111,8 @@ class UserService extends Service {
const last_month = moment(new Date()).subtract(1, 'day').format('YYYYMM'); const last_month = moment(new Date()).subtract(1, 'day').format('YYYYMM');
const lastday_data = await ctx.dataModel.YzbillCost.findAll({ const lastday_data = await ctx.dataModel.YzbillCost.findAll({
attributes: [ attributes: [
[ctx.dataModel.fn('SUM', 'pull_volumn'), 'amount'], [ctx.dataModel.fn('SUM', ctx.dataModel.col('pull_volumn')), 'amount'],
[ctx.dataModel.fn('SUM', 'cost'), 'cost'], [ctx.dataModel.fn('SUM', ctx.dataModel.col('cost')), 'cost'],
], ],
where: { user_id, day: last_day }, where: { user_id, day: last_day },
}) })
......
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