set.js 475 B

123456789101112131415161718
  1. 'use strict';
  2. const meta = require('./.set.js');
  3. const Controller = require('egg').Controller;
  4. const { CrudController } = require('naf-framework-mongoose/lib/controller');
  5. // 套餐
  6. class SetController extends Controller {
  7. constructor(ctx) {
  8. super(ctx);
  9. this.service = this.ctx.service.set;
  10. }
  11. async range() {
  12. const res = await this.service.range(this.ctx.query);
  13. this.ctx.ok({ data: res });
  14. }
  15. }
  16. module.exports = CrudController(SetController, meta);