schoolctrl.js 553 B

123456789101112131415161718192021222324
  1. 'use strict';
  2. const _ = require('lodash');
  3. const Controller = require('egg').Controller;
  4. const { CrudController } = require('naf-framework-mongoose/lib/controller');
  5. // 学校端管理
  6. class SchoolctrlController extends Controller {
  7. constructor(ctx) {
  8. super(ctx);
  9. this.service = this.ctx.service.schoolctrl;
  10. }
  11. // 学生名单上报
  12. async stuimport() {
  13. const res = await this.service.stuimport(this.ctx.request.body);
  14. this.ctx.ok({ msg: 'created', data: res });
  15. }
  16. }
  17. module.exports = CrudController(SchoolctrlController);