bill.js 449 B

12345678910111213141516
  1. 'use strict';
  2. const Controller = require('egg').Controller;
  3. const { CrudController } = require('naf-framework-mongoose-free/lib/controller');
  4. //
  5. class BillController extends Controller {
  6. constructor(ctx) {
  7. super(ctx);
  8. this.service = this.ctx.service.statistics.bill;
  9. }
  10. async getBill() {
  11. const data = await this.service.getBill(this.ctx.query);
  12. this.ctx.ok({ data });
  13. }
  14. }
  15. module.exports = CrudController(BillController, {});