12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- 'use strict';
- const Controller = require('egg').Controller;
- class PermsController extends Controller {
-
- async add() {
- let {service, ctx } = this;
- await ctx.bodyHandleByService(service.sysPerm, "addPerm", "添加成功");
- }
- async list() {
- let {service, ctx } = this;
- await ctx.queryHandleByService(service.sysPerm, "listPerm");
- }
- async delete() {
- let {service, ctx } = this;
- await ctx.queryHandleByService(service.sysPerm, "deletePerm","删除成功!");
- }
- async edit() {
- let {service, ctx } = this;
- await ctx.bodyHandleByService(service.sysPerm, "editPerm","更新成功!");
- }
- async deleteBatch() {
- let {service, ctx } = this;
- await ctx.queryHandleByService(service.sysPerm, "deleteBatch","删除成功!");
- }
- async getUserPermissionByToken() {
- let {service, ctx } = this;
- await ctx.queryHandleByService(service.sysPerm, "getUserPermissionByToken");
- }
- async queryallrole() {
- let {service, ctx } = this;
- await ctx.queryHandleByService(service.sysPerm, "queryallrole");
- }
- }
- module.exports = PermsController;
|