'use strict'; const _ = require('lodash'); const meta = require('./.lookuser.js'); const Controller = require('egg').Controller; const { CrudController } = require('naf-framework-mongoose/lib/controller'); // 管理 class LookuserController extends Controller { constructor(ctx) { super(ctx); this.service = this.ctx.service.lookuser; } async update() { const res = await this.service.update(this.ctx.params, this.ctx.request.body); this.ctx.ok({ data: res }); } async roomcount() { const data = await this.service.roomcount(this.ctx.query); this.ctx.ok({ ...data }); } async swichrole() { const res = await this.service.userswichrole(this.ctx.query); this.ctx.ok({ data: res }); } } module.exports = CrudController(LookuserController, meta);