'use strict'; const _ = require('lodash'); const meta = require('./.school.js'); const Controller = require('egg').Controller; const { CrudController } = require('naf-framework-mongoose/lib/controller'); // 学校管理 class SchoolController extends Controller { constructor(ctx) { super(ctx); this.service = this.ctx.service.school; } // 学生名单上报 async stuimport() { const res = await this.service.stuimport(this.ctx.request.body); this.ctx.ok({ msg: 'created', data: res }); } async exportSchool() { const data = await this.service.exportSchool(this.ctx.request.body); this.ctx.ok({ data }); } } module.exports = CrudController(SchoolController, meta);