'use strict'; const Controller = require('egg').Controller; class IntegralController extends Controller { async create() { const res = await this.ctx.service.integral.create(this.ctx.request.body); this.ctx.body = res; } async update() { const res = await this.ctx.service.integral.update(this.ctx.request.body); this.ctx.body = res; } async delete() { const res = await this.ctx.service.integral.delete(this.ctx.params); this.ctx.body = res; } async query() { const res = await this.ctx.service.integral.query(this.ctx.query); this.ctx.body = res; } async increase() { const res = await this.ctx.service.integral.increase(this.ctx.request.body); this.ctx.body = res; } async reduce() { const res = await this.ctx.service.integral.reduce(this.ctx.request.body); this.ctx.body = res; } } module.exports = IntegralController;