1234567891011121314151617 |
- 'use strict';
- const Controller = require('egg').Controller;
- const { CrudController } = require('naf-framework-mongoose-free/lib/controller');
- // 学生视图接口
- class StudentController extends Controller {
- constructor(ctx) {
- super(ctx);
- this.service = this.ctx.service.view.student;
- }
- async lessonList() {
- const data = await this.service.lessonList(this.ctx.query);
- this.ctx.ok(data);
- }
- }
- module.exports = CrudController(StudentController, {});
|