'use strict'; const _ = require('lodash'); const meta = require('./.mission.js'); const Controller = require('egg').Controller; const { CrudController } = require('naf-framework-mongoose/lib/controller'); // 教师申请讲课表管理 class MissionController extends Controller { constructor(ctx) { super(ctx); this.service = this.ctx.service.mission; } async count() { const res = await this.service.count(this.ctx.query); this.ctx.ok({ total: res }); } async progress() { await this.service.updateProgress(this.ctx.request.body); this.ctx.ok(); } } module.exports = CrudController(MissionController, meta);