Commit 009930ac authored by 姜登's avatar 姜登

dataModel

parent 0237f14f
Pipeline #21976 passed with stage
in 2 seconds
...@@ -106,8 +106,8 @@ class UserService extends Service { ...@@ -106,8 +106,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.findOne({ const lastday_data = await ctx.dataModel.YzbillCost.findOne({
attributes: [ attributes: [
[ctx.model.fn('SUM', 'pull_volumn'), 'amount'], [ctx.dataModel.fn('SUM', 'pull_volumn'), 'amount'],
[ctx.model.fn('SUM', 'cost'), 'cost'], [ctx.dataModel.fn('SUM', '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