'use strict'; const _ = require('lodash'); const meta = require('./.document.js'); const Controller = require('egg').Controller; const { CrudController } = require('naf-framework-mongoose/lib/controller'); // 积分归档 class DocumentController extends Controller { constructor(ctx) { super(ctx); this.service = this.ctx.service.document; } async create() { const res = await this.service.create(); this.ctx.ok({ msg: 'created', data: res }); } // GET // 查询 async queryTeacher() { const res = await this.service.queryTeacher(this.ctx.query); this.ctx.ok({ ...res }); } } module.exports = CrudController(DocumentController, meta);