apply.js 672 B

12345678910111213141516171819202122232425
  1. 'use strict';
  2. const _ = require('lodash');
  3. const meta = require('./.apply.js');
  4. const Controller = require('egg').Controller;
  5. const { CrudController } = require('naf-framework-mongoose/lib/controller');
  6. // 教师申请讲课表管理
  7. class ApplyController extends Controller {
  8. constructor(ctx) {
  9. super(ctx);
  10. this.service = this.ctx.service.apply;
  11. }
  12. async queryteacher() {
  13. const data = await this.service.queryteacher(this.ctx.request.query);
  14. this.ctx.ok({ data });
  15. }
  16. async arrange() {
  17. const data = await this.service.arrangeteacher(this.ctx.query);
  18. this.ctx.ok({ data });
  19. }
  20. }
  21. module.exports = CrudController(ApplyController, meta);