123456789101112131415161718192021222324 |
- 'use strict';
- const _ = require('lodash');
- const meta = require('./.bedroom.js');
- const Controller = require('egg').Controller;
- const { CrudController } = require('naf-framework-mongoose/lib/controller');
- // 寝室管理
- class BedroomController extends Controller {
- constructor(ctx) {
- super(ctx);
- this.service = this.ctx.service.bedroom;
- }
- // 一键分寝
- async apart() {
- const res = await this.service.apart(this.ctx.request.body);
- this.ctx.ok({ data: res });
- }
- }
- module.exports = CrudController(BedroomController, meta);
|