'use strict'; const _ = require('lodash'); const meta = require('./.student.js'); const Controller = require('egg').Controller; const { CrudController } = require('naf-framework-mongoose/lib/controller'); // 学生管理 class StudentController extends Controller { constructor(ctx) { super(ctx); this.service = this.ctx.service.student; } // GET // 查询 async seek() { const res = await this.service.seek(this.ctx.query); this.ctx.ok({ ...res }); } // GET // 查询 async findbedroom() { const data = await this.service.findbedroom(this.ctx.query); this.ctx.ok({ data }); } } module.exports = CrudController(StudentController, meta);