roleBindMenu.js 951 B

12345678910111213141516171819202122232425262728293031
  1. 'use strict';
  2. const Controller = require('egg').Controller;
  3. class RoleBindMenuController extends Controller {
  4. async bind() {
  5. const res = await this.ctx.service.roleBindMenu.bind(this.ctx.request.body);
  6. this.ctx.body = res;
  7. }
  8. async unbind() {
  9. const res = await this.ctx.service.roleBindMenu.unbind(this.ctx.request.body);
  10. this.ctx.body = res;
  11. }
  12. async queryBind() {
  13. const res = await this.ctx.service.roleBindMenu.queryBind(this.ctx.query);
  14. this.ctx.body = res;
  15. }
  16. async queryMenu() {
  17. const res = await this.ctx.service.roleBindMenu.queryMenu(this.ctx.query);
  18. this.ctx.body = res;
  19. }
  20. async batchBind() {
  21. const res = await this.ctx.service.roleBindMenu.batchBind(this.ctx.request.body);
  22. this.ctx.body = res;
  23. }
  24. async batchUnBind() {
  25. const res = await this.ctx.service.roleBindMenu.batchUnBind(this.ctx.request.body);
  26. this.ctx.body = res;
  27. }
  28. }
  29. module.exports = RoleBindMenuController;