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