'use strict'; const _ = require('lodash'); const meta = require('./.uploadquestion.js'); const Controller = require('egg').Controller; const { CrudController } = require('naf-framework-mongoose/lib/controller'); // 学生上传问卷管理 class UploadquestionController extends Controller { constructor(ctx) { super(ctx); this.service = this.ctx.service.uploadquestion; } // 完成度查询 async completion() { const res = await this.service.completion(this.ctx.query); this.ctx.ok({ ...res }); } async index() { const res = await this.service.query(this.ctx.query); this.ctx.ok({ ...res }); } } module.exports = CrudController(UploadquestionController, meta);