'use strict'; const Controller = require('egg').Controller; const { CrudController } = require('naf-framework-mongoose-free/lib/controller'); // class BillController extends Controller { constructor(ctx) { super(ctx); this.service = this.ctx.service.statistics.bill; } async getBill() { const data = await this.service.getBill(this.ctx.query); this.ctx.ok({ data }); } async outBill() { await this.service.outBill(this.ctx.request.body); this.ctx.ok(); } } module.exports = CrudController(BillController, {});