'use strict'; const Controller = require('egg').Controller; class UserBindRoleController extends Controller { async bind() { const res = await this.ctx.service.userBindRole.bind(this.ctx.request.body); this.ctx.body = res; } async unbind() { const res = await this.ctx.service.userBindRole.unbind(this.ctx.request.body); this.ctx.body = res; } async queryBind() { const res = await this.ctx.service.userBindRole.queryBind(this.ctx.query); this.ctx.body = res; } async queryRole() { const res = await this.ctx.service.userBindRole.queryRole(this.ctx.query); this.ctx.body = res; } async batchBind() { const res = await this.ctx.service.userBindRole.batchBind(this.ctx.request.body); this.ctx.body = res; } async batchUnBind() { const res = await this.ctx.service.userBindRole.batchUnBind(this.ctx.request.body); this.ctx.body = res; } } module.exports = UserBindRoleController;