Commit ef53fe4e authored by 姜登's avatar 姜登

home

parent f4a4226f
Pipeline #21973 passed with stage
in 2 seconds
...@@ -3,7 +3,7 @@ const moment = require('moment'); ...@@ -3,7 +3,7 @@ const moment = require('moment');
module.exports = app => { module.exports = app => {
const { STRING, INTEGER, DATE, DECIMAL } = app.Sequelize; const { STRING, INTEGER, DATE, DECIMAL } = app.Sequelize;
const billCost = app.dataModel.define('billCost', { const billCost = app.dataModel.define('yzbillCost', {
appKey: { type: INTEGER, primaryKey: true }, appKey: { type: INTEGER, primaryKey: true },
service: STRING, service: STRING,
day: STRING, day: STRING,
......
...@@ -3,7 +3,7 @@ const moment = require('moment'); ...@@ -3,7 +3,7 @@ const moment = require('moment');
module.exports = app => { module.exports = app => {
const { STRING, INTEGER, DATE, DECIMAL } = app.Sequelize; const { STRING, INTEGER, DATE, DECIMAL } = app.Sequelize;
const billCostMonth = app.dataModel.define('billCostMonth', { const billCostMonth = app.dataModel.define('yzbillCostMonth', {
appKey: { type: INTEGER, primaryKey: true }, appKey: { type: INTEGER, primaryKey: true },
service: STRING, service: STRING,
day_month: STRING, day_month: STRING,
......
...@@ -104,7 +104,7 @@ class UserService extends Service { ...@@ -104,7 +104,7 @@ class UserService extends Service {
const last_day = moment(new Date()).subtract(1, 'day').format('YYYY-MM-DD'); 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 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.model.fn('SUM', 'pull_volumn'), 'amount'],
[ctx.model.fn('SUM', 'cost'), 'cost'], [ctx.model.fn('SUM', 'cost'), 'cost'],
......
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