12345678910111213141516171819 |
- 'use strict';
- const Controller = require('egg').Controller;
- const meta = require('./order.json');
- const { CrudController } = require('naf-framework-mongoose/lib/controller');
- class ItemsController extends Controller {
- constructor(ctx) {
- super(ctx);
- this.service = this.ctx.service.order;
- }
- async updatestatus() {
- const { out_trade_no } = this.ctx.request.body;
- const res = await this.service.updatestatus({ out_trade_no });
- this.ctx.ok(res);
- }
- }
- module.exports = CrudController(ItemsController, meta);
|