1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- 'use strict';
- const Controller = require('egg').Controller;
- const { CrudController } = require('naf-framework-mongoose-free/lib/controller');
- //
- class AdminController extends Controller {
- constructor(ctx) {
- super(ctx);
- this.service = this.ctx.service.statistics.admin;
- }
- async todo() {
- const res = await this.service.todo(this.ctx.query);
- this.ctx.ok({ data: res });
- }
- async stockWarning() {
- const res = await this.service.stockWarning(this.ctx.query);
- this.ctx.ok({ data: res });
- }
- async notDealAfterSale() {
- const res = await this.service.notDealAfterSale(this.ctx.query);
- this.ctx.ok({ data: res });
- }
- async notSend() {
- const res = await this.service.notSend(this.ctx.query);
- this.ctx.ok({ data: res });
- }
- async notPay() {
- const res = await this.service.notPay(this.ctx.query);
- this.ctx.ok({ data: res });
- }
- async makeOrder() {
- const res = await this.service.makeOrder(this.ctx.query);
- this.ctx.ok({ data: res });
- }
- async makeAfterSale() {
- const res = await this.service.makeAfterSale(this.ctx.query);
- this.ctx.ok({ data: res });
- }
- async sellTotal() {
- const res = await this.service.sellTotal(this.ctx.query);
- this.ctx.ok({ data: res });
- }
- }
- module.exports = CrudController(AdminController, {});
|