后端
修改 entity
包下的 Menu,新增如下内容
/**
* 层级
*/
(value = "层级")
(exist = false)
private Integer level;
/**
* 子菜单
*/
(value = "子菜单")
(exist = false)
private List<Menu> children = new ArrayList<>();
/**
* 是否为选中状态
*/
(value = "是否为选中状态")
(exist = false)
private boolean isSelect;
紧接着修改 MenuController
内容如下粘贴即可,业务比较简单,在完善 RBAC 的过程当中我会直接贴代码不在做过多的讲解了
/**
* <p>
* 菜单权限 前端控制器
* </p>
*
* @author BNTang
* @since 2021-04-21
*/
(tags = "菜单组")
("/service_auth/admin/menu")
public class MenuController {
private MenuService menuService;
/**
* 查询所有菜单
*/
(value = "查询所有菜单")
("/getAllMenu")
public ResponseResult indexAllMenu() {
return ResponseResult.ok().data("children", menuService.queryAllMenu());
}
/**
* 递归删除菜单
*/
(value = "递归删除菜单")
("removeMenu/{id}")
public ResponseResult remove( String id) {
// 删除当前菜单以及子菜单
menuService.removeChildById(id);
return ResponseResult.ok();
}
/**
* 根据角色获取菜单
*/
(value = "根据角色获取菜单")
("/getMenuWithRoleId/{roleId}")
public ResponseResult toAssign( String roleId) {
return ResponseResult.ok().data("children", menuService.selectAllRoleMenu(roleId));
}
/**
* 给角色分配权限
*/
(value = "给角色分配权限")
("/doAssignRoleAuth")
public ResponseResult doAssign( String roleId, String[] menus) {
menuService.saveRoleMenuRelationShip(roleId, menus);
return ResponseResult.ok();
}
/**
* 新增菜单
*/
(value = "新增菜单")
("/saveMenu")
public ResponseResult save( Menu permission) {
menuService.save(permission);
return ResponseResult.ok();
}
/**
* 修改菜单
*/
(value = "修改菜单")
("/updateMenu")
public ResponseResult updateById( Menu menu) {
menuService.updateById(menu);
return ResponseResult.ok();
}
}
修改 MenuService
/**
* <p>
* 菜单权限 服务类
* </p>
*
* @author BNTang
* @since 2021-04-21
*/
public interface MenuService extends IService<Menu> {
/**
* 查询所有菜单
*
* @return 菜单信息
*/
List<Menu> queryAllMenu();
/**
* 递归删除菜单
*
* @param id 菜单ID
*/
void removeChildById(String id);
/**
* 根据角色获取菜单
*
* @param roleId 角色ID
* @return 菜单信息
*/
List<Menu> selectAllRoleMenu(String roleId);
/**
* 给角色分配权限
*
* @param roleId 角色ID
* @param menus 分配的权限
*/
void saveRoleMenuRelationShip(String roleId, String[] menus);
}
修改 MenuServiceImpl
/**
* <p>
* 菜单权限 服务实现类
* </p>
*
* @author BNTang
* @since 2021-04-21
*/
public class MenuServiceImpl extends ServiceImpl<MenuMapper, Menu> implements MenuService {
private RoleMenuService roleMenuService;
public List<Menu> queryAllMenu() {
// 1.查询所有的菜单
List<Menu> menuList = baseMapper.selectList(null);
// 2.构建树级菜单
return buildTreeMenu(menuList);
}
public void removeChildById(String id) {
// 最终要删除的idList
List<String> idList = new ArrayList<>();
idList.add(id);
// 递归查找出所有的子菜单的id
selectChildMenu(id, idList);
// 批量删除
baseMapper.deleteBatchIds(idList);
}
public List<Menu> selectAllRoleMenu(String roleId) {
// 1.查询所有的菜单(利用CAST函数把ID转换为了整数: SIGNED,在排序)
QueryWrapper<Menu> qw = new QueryWrapper<Menu>().orderByAsc("CAST(id AS SIGNED)");
List<Menu> menuList = baseMapper.selectList(qw);
// 2.根据角色,查询角色对象的菜单权限
QueryWrapper<RoleMenu> queryWrapper = new QueryWrapper<RoleMenu>().eq("role_id", roleId);
List<RoleMenu> roleMenuList = roleMenuService.list(queryWrapper);
// 3.确定哪些菜单成为选中状态
menuList.forEach(menu -> roleMenuList.forEach(roleMenu -> {
if (menu.getId().equals(roleMenu.getPermissionId())) {
menu.setSelect(true);
}
}));
// 4.构建树级菜单
return buildTreeMenu(menuList);
}
public void saveRoleMenuRelationShip(String roleId, String[] menus) {
// 1.删除原来的角色权限
roleMenuService.remove(new QueryWrapper<RoleMenu>().eq("role_id", roleId));
// 2.重新构建角色权限
List<RoleMenu> roleMenuArrayList = Stream.of(menus).map(menu -> {
RoleMenu roleMenu = new RoleMenu();
roleMenu.setRoleId(roleId);
roleMenu.setPermissionId(menu);
return roleMenu;
}).collect(Collectors.toList());
// 3.批量保存
roleMenuService.saveBatch(roleMenuArrayList);
}
/**
* 构建树形菜单
*/
private List<Menu> buildTreeMenu(List<Menu> menuList) {
// 最终返回的树级菜单
List<Menu> menus = new ArrayList<>();
menuList.forEach(menu -> {
// 查找最顶级的菜单
if ("0".equals(menu.getPid())) {
// 设置顶级菜单的级别
menu.setLevel(1);
// 构造子菜单
buildChildrenMenu(menu, menuList);
menus.add(menu);
}
});
return menus;
}
/**
* 构建子菜单
*/
private void buildChildrenMenu(Menu menu, List<Menu> menuList) {
// 从menuList当中查找当前的子菜单
menuList.forEach(m -> {
// 判断是不是自己的子菜单
if (menu.getId().equals(m.getPid())) {
// 是子菜单
int level = menu.getLevel() + 1;
// 设置级别
m.setLevel(level);
// 递归设置子菜单
menu.getChildren().add(m);
buildChildrenMenu(m, menuList);
}
});
}
/**
* 查询子菜单
*/
private void selectChildMenu(String id, List<String> idList) {
// 查询出当前id子菜单的条件
QueryWrapper<Menu> queryWrapper = new QueryWrapper<Menu>().eq("pid", id).select("id");
// 开始查询
List<Menu> childMenuList = baseMapper.selectList(queryWrapper);
if (childMenuList.size() > 0) {
// 取出子菜单id放到集合当中
childMenuList.forEach(menu -> {
idList.add(menu.getId());
this.selectChildMenu(menu.getId(), idList);
});
}
}
}
前端
新增 api 文件 menu.js
import request from '@/utils/request';
const api_name = '/service_auth/admin/menu';
export default {
// 获取所有菜单
getNestedTreeList() {
return request({
url: `${api_name}/getAllMenu`,
method: 'get'
});
},
// 删除菜单
removeById(id) {
return request({
url: `${api_name}/removeMenu/${id}`,
method: "post"
});
},
// 保存菜单
saveMenu(menu) {
return request({
url: `${api_name}/saveMenu`,
method: "post",
data: menu
});
},
// 更新菜单
update(menu) {
return request({
url: `${api_name}/updateMenu`,
method: "post",
data: menu
});
},
// 根据角色获取菜单
getMenuWithRoleId(roleId) {
return request({
url: `${api_name}/getMenuWithRoleId/${roleId}`,
method: 'get'
});
},
// 根据角色分配权限
doAssignRoleAuth(roleId, menus) {
return request({
url: `${api_name}/doAssignRoleAuth`,
method: "post",
params: {roleId, menus}
});
}
}
新增菜单管理的路由修改 router\index.js
{
path: 'menu/list',
name: '菜单管理',
component: () => import('@/views/video/auth/menu/list'),
meta: {title: '菜单管理'}
},
新增 list.vue
新增位置如下
<template>
<div class="app-container">
<!--
row-key,数据当中,哪一个字段能够唯一的标识一行
:expand-row-keys 要求传入的是一个数组
-->
<el-table
:data="menuList"
:expand-row-keys="expands"
row-key="id"
ref="refTable"
@row-click="clickTable"
border
:tree-props="{children: 'children', hasChildren: 'hasChildren'}">
<el-table-column prop="name" label="名称" sortable align="center"></el-table-column>
<el-table-column prop="path" label="访问路径" sortable align="center" width="180"></el-table-column>
<el-table-column prop="component" label="组件路径" sortable align="center" width="180"></el-table-column>
<el-table-column prop="permissionValue" label="权限值" align="center"/>
<!--CRUD操作-->
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button type="primary" size="mini"
@click.native.stop="() => {dialogFormVisible = true,menu.pid = scope.row.id}">添加菜单
</el-button>
<el-button type="success" size="mini"
@click.native.stop="() => getById(scope.row)">修改菜单
</el-button>
<el-button type="success" size="mini"
@click.native.stop="() => {dialogPermissionVisible = true, permission.pid = scope.row.id}">添加权限
</el-button>
<el-button type="primary" size="mini"
@click.native.stop="() => updateFunction(scope.row)">修改权限
</el-button>
<el-button type="danger" size="mini" icon="el-icon-delete"
@click.native.stop="() => remove(scope.row)"></el-button>
</template>
</el-table-column>
</el-table>
<!--
添加菜单的窗口
-->
<el-dialog :visible.sync="dialogFormVisible" :title="dialogFormValue">
<el-form ref="menu" :model="menu" :rules="menuValidateRules" label-width="120px">
<el-form-item label="菜单名称" prop="name">
<el-input v-model="menu.name"/>
</el-form-item>
<el-form-item label="访问路径" prop="path">
<el-input v-model="menu.path"/>
</el-form-item>
<el-form-item label="组件路径" prop="component">
<el-input v-model="menu.component"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="resetData()">取 消</el-button>
<el-button type="primary" @click="addMenuClick()">确 定</el-button>
</div>
</el-dialog>
<!--
添加权限的窗口
-->
<el-dialog :visible.sync="dialogPermissionVisible" title="添加功能权限">
<el-form ref="permission" :model="permission" :rules="permissionValidateRules" label-width="120px">
<el-form-item label="功能名称" prop="name">
<el-input v-model="permission.name"/>
</el-form-item>
<el-form-item label="访问路径">
<el-input v-model="permission.path"/>
</el-form-item>
<el-form-item label="组件路径">
<el-input v-model="permission.component"/>
</el-form-item>
<el-form-item label="功能权限值" prop="permissionValue">
<el-input v-model="permission.permissionValue"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="resetData()">取 消</el-button>
<el-button type="primary" @click="appendPermission()">确 定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import menu from '@/api/video/auth/menu';
// 菜单实体
const menuForm = {
name: '',
pid: 0,
path: '',
component: '',
type: 1
}
// 权限实体
const perForm = {
permissionValue: '',
name: '',
path: '',
component: '',
pid: 0,
type: 2
}
export default {
name: "list",
// 初始化相关属性
data() {
return {
menuList: [],
defaultProps: {
children: 'children',
label: 'name'
},
dialogFormValue: '添加菜单',
dialogFormVisible: false,
dialogPermissionVisible: false,
menu: {...menuForm},
permission: {...perForm},
menuValidateRules: {
name: [{required: true, trigger: 'blur', message: '菜单名必须输入'}],
path: [{required: true, trigger: 'blur', message: '菜单路径必须输入'}],
component: [{required: true, trigger: 'blur', message: '组件名称必须输入'}]
},
permissionValidateRules: {
name: [{required: true, trigger: 'blur', message: '功能名称必须输入'}],
permissionValue: [{required: true, trigger: 'blur', message: '功能权限值必须输入'}]
},
// 要展开的行,数值的元素是row的key值
expands: []
}
},
created() {
// 获取列表数据
this.fetchNodeList();
},
methods: {
// table的方法,展开/折叠 行
clickTable(row, index, e) {
// 调用,table的方法,展开/折叠 行
this.$refs.refTable.toggleRowExpansion(row);
},
// 获取列表数据
fetchNodeList() {
menu.getNestedTreeList().then(res => {
if (res.success === true) {
this.menuList = res.data.children;
this.expands.push(this.menuList[0].id);
this.resetData();
}
});
},
// 删除菜单
remove(data) {
this.$confirm('此操作将永久删除该记录, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
return menu.removeById(data.id);
}).then(() => {
// 刷新列表
this.fetchNodeList();
this.$message({
type: 'success',
message: '删除成功!'
});
// 失败
}).catch((res) => {
if (res === 'cancel') {
this.$message({
type: 'info',
message: '已取消删除'
})
} else {
this.$message({
type: 'error',
message: '删除失败'
});
}
});
},
// 添加功能权限
appendPermission() {
this.$refs.permission.validate(valid => {
if (valid) {
if (this.permission.id) {
this.update(this.permission);
} else {
menu.saveMenu(this.permission).then(res => {
this.dialogPermissionVisible = false;
this.$message({
type: 'success',
message: '添加权限成功'
});
// 刷新数据,展开菜单
menu.getNestedTreeList().then(res => {
if (res.success === true) {
this.menuList = res.data.children;
this.expands.push(this.permission.pid);
this.resetData();
}
});
});
}
}
});
},
// 添加菜单点击
addMenuClick() {
this.$refs.menu.validate(valid => {
if (valid) {
// 添加
if (!this.menu.id) {
this.addMenu();
} else {
// 修改
this.update(this.menu);
}
}
})
},
// 添加菜单
addMenu() {
menu.saveMenu(this.menu).then(res => {
this.dialogFormVisible = false
this.$message({
type: 'success',
message: '添加菜单成功'
})
// 刷新数据,展开菜单
menu.getNestedTreeList().then(response => {
if (response.success === true) {
this.menuList = response.data.children;
// 展开刚添加菜单的父级
this.expands.push(this.menu.pid);
this.resetData();
}
});
}).catch(error => {
this.dialogFormVisible = false;
this.$message({
type: 'error',
message: '添加菜单失败'
});
});
},
// 修改菜单
update(obj) {
menu.update(obj).then(res => {
this.dialogFormVisible = false;
this.$message({
type: 'success',
message: '修改成功'
});
// 刷新页面
this.fetchNodeList();
this.resetData();
})
},
// 获取菜单信息
getById(data) {
this.dialogFormVisible = true;
this.menu = data;
},
// 修改权限点击
updateFunction(data) {
this.dialogPermissionVisible = true;
this.permission = data;
},
// 重置数据
resetData() {
this.dialogPermissionVisible = false;
this.dialogFormVisible = false;
this.menu = {...menuForm};
this.permission = {...perForm};
}
}
}
</script>
菜单相关数据插入 SQL
INSERT INTO `video_db`.`auth_menu` (`id`, `pid`, `name`, `type`, `permission_value`, `path`, `component`, `icon`, `status`, `is_deleted`, `gmt_create`, `gmt_modified`) VALUES ('1', '0', '全部数据', 0, NULL, NULL, NULL, NULL, NULL, 0, '2021-05-05 19:17:09', '2021-05-05 19:17:09');
INSERT INTO `video_db`.`auth_menu` (`id`, `pid`, `name`, `type`, `permission_value`, `path`, `component`, `icon`, `status`, `is_deleted`, `gmt_create`, `gmt_modified`) VALUES ('1195268474480156673', '1', '权限管理', 1, NULL, '/authority', 'Layout', NULL, NULL, 0, '2021-05-05 19:17:09', '2021-05-05 19:17:09');
INSERT INTO `video_db`.`auth_menu` (`id`, `pid`, `name`, `type`, `permission_value`, `path`, `component`, `icon`, `status`, `is_deleted`, `gmt_create`, `gmt_modified`) VALUES ('1195268616021139457', '1195268474480156673', '用户管理', 1, NULL, 'user/list', 'authority/user/list', NULL, NULL, 0, '2021-05-05 19:17:09', '2021-05-05 19:17:09');
INSERT INTO `video_db`.`auth_menu` (`id`, `pid`, `name`, `type`, `permission_value`, `path`, `component`, `icon`, `status`, `is_deleted`, `gmt_create`, `gmt_modified`) VALUES ('1195268788138598401', '1195268474480156673', '角色管理', 1, NULL, 'role/list', 'authority/role/list', NULL, NULL, 0, '2021-05-05 19:17:09', '2021-05-05 19:17:09');
INSERT INTO `video_db`.`auth_menu` (`id`, `pid`, `name`, `type`, `permission_value`, `path`, `component`, `icon`, `status`, `is_deleted`, `gmt_create`, `gmt_modified`) VALUES ('1195268893830864898', '1195268474480156673', '菜单管理', 1, NULL, 'menu/list', 'authority/menu/list', NULL, NULL, 0, '2021-05-05 19:17:09', '2021-05-05 19:17:09');
INSERT INTO `video_db`.`auth_menu` (`id`, `pid`, `name`, `type`, `permission_value`, `path`, `component`, `icon`, `status`, `is_deleted`, `gmt_create`, `gmt_modified`) VALUES ('1195269143060602882', '1195268616021139457', '查看', 2, 'user.list', '', '', NULL, NULL, 0, '2021-05-05 19:17:09', '2021-05-05 19:17:09');
INSERT INTO `video_db`.`auth_menu` (`id`, `pid`, `name`, `type`, `permission_value`, `path`, `component`, `icon`, `status`, `is_deleted`, `gmt_create`, `gmt_modified`) VALUES ('1195269295926206466', '1195268616021139457', '添加', 2, 'user.add', 'user/add', 'authority/user/form', NULL, NULL, 0, '2021-05-05 19:17:09', '2021-05-05 19:17:09');
INSERT INTO `video_db`.`auth_menu` (`id`, `pid`, `name`, `type`, `permission_value`, `path`, `component`, `icon`, `status`, `is_deleted`, `gmt_create`, `gmt_modified`) VALUES ('1195269473479483394', '1195268616021139457', '修改', 2, 'user.update', 'user/update/:id', 'authority/user/form', NULL, NULL, 0, '2021-05-05 19:17:09', '2021-05-05 19:17:09');
INSERT INTO `video_db`.`auth_menu` (`id`, `pid`, `name`, `type`, `permission_value`, `path`, `component`, `icon`, `status`, `is_deleted`, `gmt_create`, `gmt_modified`) VALUES ('1195269547269873666', '1195268616021139457', '删除', 2, 'user.remove', '', '', NULL, NULL, 0, '2021-05-05 19:17:09', '2021-05-05 19:17:09');
INSERT INTO `video_db`.`auth_menu` (`id`, `pid`, `name`, `type`, `permission_value`, `path`, `component`, `icon`, `status`, `is_deleted`, `gmt_create`, `gmt_modified`) VALUES ('1195269821262782465', '1195268788138598401', '修改', 2, 'role.update', 'role/update/:id', 'authority/role/form', NULL, NULL, 0, '2021-05-05 19:17:09', '2021-05-05 19:17:09');
INSERT INTO `video_db`.`auth_menu` (`id`, `pid`, `name`, `type`, `permission_value`, `path`, `component`, `icon`, `status`, `is_deleted`, `gmt_create`, `gmt_modified`) VALUES ('1195269903542444034', '1195268788138598401', '查看', 2, 'role.list', '', '', NULL, NULL, 0, '2021-05-05 19:17:09', '2021-05-05 19:17:09');
INSERT INTO `video_db`.`auth_menu` (`id`, `pid`, `name`, `type`, `permission_value`, `path`, `component`, `icon`, `status`, `is_deleted`, `gmt_create`, `gmt_modified`) VALUES ('1195270037005197313', '1195268788138598401', '添加', 2, 'role.add', 'role/form', 'authority/role/form', NULL, NULL, 0, '2021-05-05 19:17:09', '2021-05-05 19:17:09');
INSERT INTO `video_db`.`auth_menu` (`id`, `pid`, `name`, `type`, `permission_value`, `path`, `component`, `icon`, `status`, `is_deleted`, `gmt_create`, `gmt_modified`) VALUES ('1195270442602782721', '1195268788138598401', '删除', 2, 'role.remove', '', '', NULL, NULL, 0, '2021-05-05 19:17:09', '2021-05-05 19:17:09');
INSERT INTO `video_db`.`auth_menu` (`id`, `pid`, `name`, `type`, `permission_value`, `path`, `component`, `icon`, `status`, `is_deleted`, `gmt_create`, `gmt_modified`) VALUES ('1195270621548568578', '1195268788138598401', '角色权限', 2, 'role.acl', 'role/distribution/:id', 'authority/role/roleForm', NULL, NULL, 0, '2021-05-05 19:17:09', '2021-05-05 19:17:09');
INSERT INTO `video_db`.`auth_menu` (`id`, `pid`, `name`, `type`, `permission_value`, `path`, `component`, `icon`, `status`, `is_deleted`, `gmt_create`, `gmt_modified`) VALUES ('1195270744097742849', '1195268893830864898', '查看', 2, 'menu.list', '', '', NULL, NULL, 0, '2021-05-05 19:17:09', '2021-05-05 19:17:09');
INSERT INTO `video_db`.`auth_menu` (`id`, `pid`, `name`, `type`, `permission_value`, `path`, `component`, `icon`, `status`, `is_deleted`, `gmt_create`, `gmt_modified`) VALUES ('1195270810560684034', '1195268893830864898', '添加', 2, 'menu.add', '', '', NULL, NULL, 0, '2021-05-05 19:17:09', '2021-05-05 19:17:09');
INSERT INTO `video_db`.`auth_menu` (`id`, `pid`, `name`, `type`, `permission_value`, `path`, `component`, `icon`, `status`, `is_deleted`, `gmt_create`, `gmt_modified`) VALUES ('1195270862100291586', '1195268893830864898', '修改', 2, 'menu.update', '', '', NULL, NULL, 0, '2021-05-05 19:17:09', '2021-05-05 19:17:09');
INSERT INTO `video_db`.`auth_menu` (`id`, `pid`, `name`, `type`, `permission_value`, `path`, `component`, `icon`, `status`, `is_deleted`, `gmt_create`, `gmt_modified`) VALUES ('1195270887933009922', '1195268893830864898', '删除', 2, 'menu.remove', '', '', NULL, NULL, 0, '2021-05-05 19:17:09', '2021-05-05 19:17:09');
INSERT INTO `video_db`.`auth_menu` (`id`, `pid`, `name`, `type`, `permission_value`, `path`, `component`, `icon`, `status`, `is_deleted`, `gmt_create`, `gmt_modified`) VALUES ('1195349439240048642', '1', '创作者管理', 1, NULL, '/author', 'Layout', NULL, NULL, 0, '2021-05-05 19:17:09', '2021-05-05 19:17:09');
INSERT INTO `video_db`.`auth_menu` (`id`, `pid`, `name`, `type`, `permission_value`, `path`, `component`, `icon`, `status`, `is_deleted`, `gmt_create`, `gmt_modified`) VALUES ('1195349699995734017', '1195349439240048642', '创作者列表', 1, NULL, 'table', 'video/author/list', NULL, NULL, 0, '2021-05-05 19:17:09', '2021-05-05 19:17:09');
INSERT INTO `video_db`.`auth_menu` (`id`, `pid`, `name`, `type`, `permission_value`, `path`, `component`, `icon`, `status`, `is_deleted`, `gmt_create`, `gmt_modified`) VALUES ('1195349810561781761', '1195349439240048642', '添加创作者', 1, NULL, 'save', 'video/author/save', NULL, NULL, 0, '2021-05-05 19:17:09', '2021-05-05 19:17:09');
INSERT INTO `video_db`.`auth_menu` (`id`, `pid`, `name`, `type`, `permission_value`, `path`, `component`, `icon`, `status`, `is_deleted`, `gmt_create`, `gmt_modified`) VALUES ('1195349876252971010', '1195349810561781761', '添加', 2, 'author.add', '', '', NULL, NULL, 0, '2021-05-05 19:17:09', '2021-05-05 19:17:09');
INSERT INTO `video_db`.`auth_menu` (`id`, `pid`, `name`, `type`, `permission_value`, `path`, `component`, `icon`, `status`, `is_deleted`, `gmt_create`, `gmt_modified`) VALUES ('1195349979797753857', '1195349699995734017', '查看', 2, 'author.list', '', '', NULL, NULL, 0, '2021-05-05 19:17:09', '2021-05-05 19:17:09');
INSERT INTO `video_db`.`auth_menu` (`id`, `pid`, `name`, `type`, `permission_value`, `path`, `component`, `icon`, `status`, `is_deleted`, `gmt_create`, `gmt_modified`) VALUES ('1195350117270261762', '1195349699995734017', '修改', 2, 'author.update', 'edit/:id', 'video/author/save', NULL, NULL, 0, '2021-05-05 19:17:09', '2021-05-05 19:17:09');
INSERT INTO `video_db`.`auth_menu` (`id`, `pid`, `name`, `type`, `permission_value`, `path`, `component`, `icon`, `status`, `is_deleted`, `gmt_create`, `gmt_modified`) VALUES ('1195350188359520258', '1195349699995734017', '删除', 2, 'author.remove', '', '', NULL, NULL, 0, '2021-05-05 19:17:09', '2021-05-05 19:17:09');
INSERT INTO `video_db`.`auth_menu` (`id`, `pid`, `name`, `type`, `permission_value`, `path`, `component`, `icon`, `status`, `is_deleted`, `gmt_create`, `gmt_modified`) VALUES ('1195350299365969922', '1', '作品分类', 1, NULL, '/video/category', 'Layout', NULL, NULL, 0, '2021-05-05 19:17:09', '2021-05-05 19:17:09');
INSERT INTO `video_db`.`auth_menu` (`id`, `pid`, `name`, `type`, `permission_value`, `path`, `component`, `icon`, `status`, `is_deleted`, `gmt_create`, `gmt_modified`) VALUES ('1195350397751758850', '1195350299365969922', '作品分类列表', 1, NULL, 'list', 'video/category/list', NULL, NULL, 0, '2021-05-05 19:17:09', '2021-05-05 19:17:09');
INSERT INTO `video_db`.`auth_menu` (`id`, `pid`, `name`, `type`, `permission_value`, `path`, `component`, `icon`, `status`, `is_deleted`, `gmt_create`, `gmt_modified`) VALUES ('1195350500512206850', '1195350299365969922', '上传作品分类', 1, NULL, 'import', 'video/category/save', NULL, NULL, 0, '2021-05-05 19:17:09', '2021-05-05 19:17:09');
INSERT INTO `video_db`.`auth_menu` (`id`, `pid`, `name`, `type`, `permission_value`, `path`, `component`, `icon`, `status`, `is_deleted`, `gmt_create`, `gmt_modified`) VALUES ('1195350612172967938', '1195350397751758850', '查看', 2, 'category.list', '', '', NULL, NULL, 0, '2021-05-05 19:17:09', '2021-05-05 19:17:09');
INSERT INTO `video_db`.`auth_menu` (`id`, `pid`, `name`, `type`, `permission_value`, `path`, `component`, `icon`, `status`, `is_deleted`, `gmt_create`, `gmt_modified`) VALUES ('1195350687590748161', '1195350500512206850', '导入', 2, 'category.import', '', '', NULL, NULL, 0, '2021-05-05 19:17:09', '2021-05-05 19:17:09');
INSERT INTO `video_db`.`auth_menu` (`id`, `pid`, `name`, `type`, `permission_value`, `path`, `component`, `icon`, `status`, `is_deleted`, `gmt_create`, `gmt_modified`) VALUES ('1195350831744782337', '1', '作品管理', 1, NULL, '/video/content', 'Layout', NULL, NULL, 0, '2021-05-05 19:17:09', '2021-05-05 19:17:09');
INSERT INTO `video_db`.`auth_menu` (`id`, `pid`, `name`, `type`, `permission_value`, `path`, `component`, `icon`, `status`, `is_deleted`, `gmt_create`, `gmt_modified`) VALUES ('1195350919074385921', '1195350831744782337', '作品列表', 1, NULL, 'list', 'video/content/list', NULL, NULL, 0, '2021-05-05 19:17:09', '2021-05-05 19:17:09');
INSERT INTO `video_db`.`auth_menu` (`id`, `pid`, `name`, `type`, `permission_value`, `path`, `component`, `icon`, `status`, `is_deleted`, `gmt_create`, `gmt_modified`) VALUES ('1195351020463296513', '1195350831744782337', '添加作品', 1, NULL, 'info', 'video/content/info', NULL, NULL, 0, '2021-05-05 19:17:09', '2021-05-05 19:17:09');
INSERT INTO `video_db`.`auth_menu` (`id`, `pid`, `name`, `type`, `permission_value`, `path`, `component`, `icon`, `status`, `is_deleted`, `gmt_create`, `gmt_modified`) VALUES ('1195351159672246274', '1195350919074385921', '发布作品', 2, 'content.publish', 'send/:id', 'video/content/send', NULL, NULL, 0, '2021-05-05 19:17:09', '2021-05-05 19:17:09');
INSERT INTO `video_db`.`auth_menu` (`id`, `pid`, `name`, `type`, `permission_value`, `path`, `component`, `icon`, `status`, `is_deleted`, `gmt_create`, `gmt_modified`) VALUES ('1195351326706208770', '1195350919074385921', '编辑课程', 2, 'content.update', 'info/:id', 'video/content/info', NULL, NULL, 0, '2021-05-05 19:17:09', '2021-05-05 19:17:09');
INSERT INTO `video_db`.`auth_menu` (`id`, `pid`, `name`, `type`, `permission_value`, `path`, `component`, `icon`, `status`, `is_deleted`, `gmt_create`, `gmt_modified`) VALUES ('1195351566221938690', '1195350919074385921', '章节信息', 2, 'chapter.update', 'chapter/:id', 'video/content/chapter', NULL, NULL, 0, '2021-05-05 19:17:09', '2021-05-05 19:17:09');
INSERT INTO `video_db`.`auth_menu` (`id`, `pid`, `name`, `type`, `permission_value`, `path`, `component`, `icon`, `status`, `is_deleted`, `gmt_create`, `gmt_modified`) VALUES ('1196301740985311234', '1195268616021139457', '分配角色', 2, 'user.assgin', 'user/role/:id', 'authority/user/roleForm', NULL, NULL, 0, '2021-05-05 19:17:09', '2021-05-05 19:17:09');
INSERT INTO `video_db`.`auth_menu` (`id`, `pid`, `name`, `type`, `permission_value`, `path`, `component`, `icon`, `status`, `is_deleted`, `gmt_create`, `gmt_modified`) VALUES ('1388495490356727810', '1195349699995734017', '测试', 2, 'test', '', '', NULL, NULL, 1, '2021-05-01 22:08:17', '2021-05-01 22:08:17');
INSERT INTO `video_db`.`auth_menu` (`id`, `pid`, `name`, `type`, `permission_value`, `path`, `component`, `icon`, `status`, `is_deleted`, `gmt_create`, `gmt_modified`) VALUES ('1388495557524312066', '1195349699995734017', 'test2', 2, 'test2', '2', '2', NULL, NULL, 1, '2021-05-01 22:08:33', '2021-05-01 22:08:45');