apply.js 839 B

123456789101112131415161718192021222324252627282930
  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.request.body);
  18. this.ctx.ok({ data });
  19. }
  20. async clearArrange() {
  21. const data = await this.service.clearArrange(this.ctx.request.body);
  22. this.ctx.ok({ data });
  23. }
  24. }
  25. module.exports = CrudController(ApplyController, meta);