Compare commits

...
103 Commits
Author SHA1 Message Date
pixel a385d41cc3 Merge remote-tracking branch 'origin/master' 2020-09-23 11:29:30 +08:00
pixel 9e6414fcb1 根据gorm调整初始化数据 sys_data_authority_ids -> sys_data_authority_id 2020-09-23 11:29:05 +08:00
QM303176530 9e19684d40 取消 xlsx类型返回 后续作为单独接口示例 修复前端配置文件form表单内容 2020-09-20 12:28:20 +08:00
QM303176530 56c226919e 取消 OkWithXlsx方法 后期会新增示例接口 此处不通用 2020-09-19 23:23:35 +08:00
QM303176530 c6d6180c3c Merge branches 'develop' and 'gva_gormv2_dev' of https://github.com/flipped-aurora/gin-vue-admin into gva_gormv2_dev 2020-09-19 23:20:06 +08:00
QM303176530 9265397f29 casbin修改性能优化 2020-09-19 23:19:18 +08:00
QM303176530 7aea8d71aa Merge branch 'gva_gormv2_dev' of https://github.com/flipped-aurora/gin-vue-admin into gva_gormv2_dev 2020-09-19 22:55:51 +08:00
SliverHorn 40f8ab6101 更新docker-compose的脚本文件 2020-09-19 14:34:17 +08:00
奇淼(piexlmax d7f490a0e8 Merge pull request #219 from HuLuWang/master
cors.go: fix部分浏览器不支持*的格式
2020-09-19 10:37:43 +08:00
汪先森 01a5b859a9 global/response/response.go: add download xlsx method 2020-09-18 18:15:27 +08:00
汪先森 bafe18f6e1 cors.go: fix部分浏览器不支持*的格式 2020-09-18 17:38:14 +08:00
pixel cd310eac17 Merge remote-tracking branch 'origin/gva_gormv2_dev' into gva_gormv2_dev 2020-09-18 15:41:44 +08:00
pixel cbdf1cd92e 取消comment后携带的'' 2020-09-18 15:41:26 +08:00
SliverHorn 759dd34c76 优化zap.go代码,修改dubg输出为info输出 2020-09-16 10:31:56 +08:00
pixel 3fbb2ab0ca 修复前端打包404的问题 2020-09-15 18:09:45 +08:00
pixel ad107aadf1 修复打包过后404的bug 2020-09-15 18:08:26 +08:00
pixel e6e0f1d5db Merge branch 'develop' of https://github.com/piexlmax/QMPlus into gva_gormv2_dev 2020-09-15 16:21:47 +08:00
pixel d3dfdace9f Merge branch 'master' of https://github.com/piexlmax/QMPlus into gva_gormv2_dev 2020-09-15 16:20:13 +08:00
SliverHorn 88abbc26d1 更新配置文件的统一化,并修改zap的level为info 2020-09-15 15:20:07 +08:00
pixel 095b2ff27e 重新整理readme结构 2020-09-15 15:11:53 +08:00
SliverHorn 28f03c3d7e 更新文档(docker-compose的部署说明,swag的安装方式,zap的使用与配置说明) 2020-09-15 11:42:34 +08:00
SliverHorn 3db0cedf7e 修改docker-compose的init.sql的COLLATE由utf8mb4_0900_ai_ci改为utf8mb4_unicode_ci 2020-09-15 10:33:50 +08:00
QM303176530 11fdd96352 修改前端用户信息修改位置,防止报错 2020-09-14 20:39:14 +08:00
pixel b6dfb393a1 替换开发者信息至官网内部链接 2020-09-14 13:38:10 +08:00
pixel 268af2e84e 替换开发者信息至官网内部链接 2020-09-14 13:37:31 +08:00
奇淼(piexlmax 225ef0fc8d Merge pull request #208 from maplepie/master
Update config.go
2020-09-12 21:36:23 +08:00
maplepie d382d15f78 Update config.go
支持自定义配置文件位置
2020-09-12 12:05:49 +08:00
pixel 0833c09e98 Merge branch 'develop' of https://github.com/piexlmax/QMPlus into gva_gormv2_dev 2020-09-11 17:27:05 +08:00
pixel 3e62007e6a Merge remote-tracking branch 'origin/gva_gormv2_dev' into gva_gormv2_dev 2020-09-11 14:21:50 +08:00
pixel d5550bf99c gorm 版本修改 mysql驱动版本修改 2020-09-11 14:21:26 +08:00
SliverHorn 1bdf0cb2ea 更新文档 2020-09-11 11:58:47 +08:00
SliverHorn e3ccccd1f3 更新文档,优化docker-compose的网络自定义 2020-09-11 11:43:17 +08:00
SliverHorn ecfc8cd1e7 更新文档 2020-09-10 19:25:20 +08:00
SliverHorn ba0bcefec4 优化docker-compose的前端项目不依赖于Gin,使用nginx 2020-09-10 19:15:44 +08:00
SliverHorn 93d1fdae31 gorm降回v0.2.35 2020-09-10 11:04:11 +08:00
SliverHorn 35d0ab10a9 Merge pull request #204 from maplepie/master
优化图标列表代码
2020-09-09 18:36:02 +08:00
maplepie d9db6c1b36 Update index.vue
优化代码
2020-09-09 18:23:58 +08:00
pixel 096fa511f4 Merge branch 'develop' of https://github.com/piexlmax/QMPlus into gva_gormv2_dev 2020-09-09 16:17:43 +08:00
pixel df69c96bd3 默认readme修改为中文 2020-09-09 16:17:26 +08:00
pixel 9b40ea5913 默认readme修改为中文 2020-09-09 16:03:36 +08:00
pixel c9b484bec2 取消头像地址配置 2020-09-09 16:01:28 +08:00
SliverHorn c6700a72bc 适配了Gorm的v1.20.0版本,迁移初始表的注册函数至gorm.go并优化了代码,注释了sqlite的初始化,需要的自行打开注释,默认使用mysql 2020-09-09 14:48:33 +08:00
pixel 630300cf37 修改email基础配置数据 2020-09-08 17:00:14 +08:00
奇淼(piexlmax fd0f741a01 Merge pull request #201 from maplepie/master
增加邮件发送功能
2020-09-08 16:16:48 +08:00
maplepie 6631aa35db add email module 2020-09-08 15:57:46 +08:00
SliverHorn e9ef8f7882 完成GORM的支持四个数据库的配置 2020-09-07 18:17:27 +08:00
pixel be9c85ae42 删除无用函数,整洁结构目录 2020-09-07 13:56:21 +08:00
pixel a8b01b6314 开启初始化配置 暂时修改为 配置文件控制 2020-09-07 13:18:02 +08:00
pixel 513259f65f 自动初始化单独建包 为 命令行做基础 2020-09-07 13:10:53 +08:00
pixel 11cde72962 Merge remote-tracking branch 'origin/gva_gormv2_dev' into gva_gormv2_dev
# Conflicts:
#	server/go.mod
#	server/initialize/data.go
#	server/model/sys_base_menu.go
#	server/service/sys_db_initialize.go
2020-09-07 11:38:46 +08:00
pixel fb6dfcbd72 自动初始化单独建仓 为 命令行做基础 2020-09-07 11:33:28 +08:00
SliverHorn 734ff79890 更新docker-compose的server-handle.sh 2020-09-07 09:55:15 +08:00
QM303176530 2fdb014717 增加官方网站 2020-09-05 12:28:32 +08:00
QM303176530 377777e2c1 gormv2版本不再提供db初始化数据 2020-09-05 12:05:27 +08:00
SliverHorn e810a08c0e go-logging(停止维护了)替换成zap, zap的配置完善优化,gva的日志更换zap后的处理 2020-09-05 11:55:51 +08:00
QM303176530 14ea27749c 增加侧边栏配置其他网站功能(name以:http://开头或者https://开头即可) 2020-09-05 11:40:45 +08:00
SliverHorn 012f2569b1 zap日志的配置优化及初始化优化 2020-09-03 16:25:52 +08:00
SliverHorn 01c4206443 新增zap日志库的支持,并提供Recovery的中间件 2020-09-02 15:13:54 +08:00
SliverHorn a46859987e 修改docker-compose的mysql镜像源为官方的mysql,脚本和初始数据迁移到.docker-compose文件夹下,为docker-server添加ls -al方便使用docker-compose的时候调试错误 2020-09-02 10:50:57 +08:00
QM303176530 34bc072efd gormv2版本不再提供db初始化数据 2020-08-31 23:48:02 +08:00
QM303176530 d7813c3507 用户头像由上传模式改为 媒体库选择模式 2020-08-31 23:33:28 +08:00
QM303176530 0403ec3ffe 用户头像由上传模式改为 媒体库选择模式 2020-08-31 23:04:53 +08:00
QM303176530 f8cb44b51d 调整gorm2版本对应模板细节 2020-08-31 21:23:25 +08:00
pixel b31a8d34d6 清理无用方法FileCreateComplete 2020-08-31 18:05:40 +08:00
pixel 2c5a19fe8f errors.Is相关代码嵌套层级简化 2020-08-31 18:03:54 +08:00
SliverHorn 67ec569fc1 更新测试文档 2020-08-31 16:10:19 +08:00
SliverHorn ccdb695c06 更新文档,修复新增菜单的name重复问题,修复sys_user注册,删除更新记录与casb RBAC RESTFUL测试,多余数据的删除 2020-08-31 16:05:26 +08:00
pixel db0bddf1d4 取消对插件的支持 2020-08-31 15:29:08 +08:00
pixel c1dc629daf Merge remote-tracking branch 'origin/gva_gormv2_dev' into gva_gormv2_dev
# Conflicts:
#	server/db/qmplus.sql
2020-08-31 15:27:41 +08:00
QM303176530 dd789b3991 Merge branches 'gva_gormv2_dev' and 'master' of https://github.com/flipped-aurora/gin-vue-admin into gva_gormv2_dev
 Conflicts:
	server/core/install_plugs.go
	server/initialize/plug.go
	server/model/sys_authority.go
2020-08-29 21:30:55 +08:00
QM303176530 be8bac1ea1 取消插件模式 不再对插件提供支持 2020-08-29 21:26:45 +08:00
奇淼(piexlmax 602a64b879 Update FUNDING.yml 2020-08-29 21:23:22 +08:00
QM303176530 3a8ea28ea2 清理垃圾数据 默认七牛上传 2020-08-29 16:30:30 +08:00
QM303176530 39e7b641ea 清理垃圾数据 2020-08-29 16:30:09 +08:00
QM303176530 a104453aae Merge branches 'develop' and 'gva_gormv2_dev' of https://github.com/flipped-aurora/gin-vue-admin into gva_gormv2_dev
 Conflicts:
	server/db/qmplus.sql
	server/service/sys_menu.go
2020-08-29 16:29:24 +08:00
QM303176530 59af022125 默认使用七牛上传 2020-08-29 16:24:57 +08:00
QM303176530 e92df293d5 Merge branches 'develop' and 'gin-vue-admin_v2_dev' of https://github.com/flipped-aurora/gin-vue-admin into gin-vue-admin_v2_dev 2020-08-29 16:20:42 +08:00
QM303176530 4805879702 向gormv2过度 自定义类型长度使用size进行限制 2020-08-29 16:19:15 +08:00
QM303176530 f90d4745c1 视图 格式化 2020-08-29 16:15:44 +08:00
QM303176530 f53f8ddc65 增加mysql过滤,修改角色id长度 模板长度修改为size模式 2020-08-29 15:55:35 +08:00
QM303176530 6ec20fce3a 增加mysql过滤,修改角色id长度 2020-08-29 15:11:20 +08:00
pixel 88e7b46f32 防止自动建表失败 角色id主键长度限制为100 2020-08-27 12:56:14 +08:00
pixel f707f70f80 Merge branch 'develop' of https://github.com/piexlmax/QMPlus into gva_gormv2_dev
 Conflicts:
	server/db/qmplus.sql
	server/service/sys_menu.go
2020-08-27 11:19:03 +08:00
奇淼(piexlmax 16722ccd31 Merge pull request #189 from azunia/own_dev
修改了头像组件 增加了本地上传功能
2020-08-26 17:49:43 +08:00
azunia 7e1cfc6f09 可切换本地与七牛云上传,增加头像与图片组件 2020-08-26 17:26:03 +08:00
azunia d6fe1339b2 可切换本地与七牛云上传,增加头像与图片组建 2020-08-26 17:16:49 +08:00
SliverHorn aab91dec6c 更新测试文档及初始数据的错误,修复in条件查询, gormv2取消()的占位符,更新模板文件的()占位符 2020-08-26 13:46:03 +08:00
SliverHorn 40e2344629 api管理测试完成,修复casbin的API更新随动map[string]string改为map[string]interface{} 2020-08-26 11:23:40 +08:00
SliverHorn 8fb0df69b9 注释初始化函数,按需打开 2020-08-25 18:39:53 +08:00
SliverHorn 8a45a686a0 修复视图执行失败的bug 2020-08-25 18:39:10 +08:00
SliverHorn d4101f7f34 修复一些数据同步问题,更新文档,取消在配置文件读取值作为同步数据的标志,改为方法注释的方式 2020-08-25 18:17:33 +08:00
SliverHorn cf73dbd0d9 数据初始化完成 2020-08-25 16:34:45 +08:00
pixel 6c9f8b5eba Association相关问题修复 2020-08-25 14:41:28 +08:00
pixel 5a9247509a 修改 authority 关联删除的问题 2020-08-25 13:56:48 +08:00
QM303176530 98d5cab1d5 文档更新 2020-08-24 21:53:50 +08:00
SliverHorn 87ee4436ea 添加测试文档,Find替换为First方法 2020-08-24 15:54:21 +08:00
QM303176530 2bbb51c41e utf8->utf8mb4 2020-08-23 19:26:52 +08:00
QM303176530 7fca9c7ce0 gormv2升级 阶段2 2020-08-23 16:41:22 +08:00
QM303176530 aee6748c49 gormv2升级 阶段2 2020-08-23 16:29:26 +08:00
QM303176530 ee9b19bb0b gormv2升级 阶段2 2020-08-23 16:28:20 +08:00
QM303176530 f69b40a532 重大bug紧急修复,获取本角色菜单查询条件丢失! 2020-08-23 15:38:03 +08:00
QM303176530 48e6ac39e2 gormv2升级 第一阶段 2020-08-23 15:27:00 +08:00
QM303176530 363ff3ba70 gormv2升级 第一阶段 2020-08-23 15:13:23 +08:00
132 changed files with 9191 additions and 14877 deletions
@@ -0,0 +1,730 @@
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 80019
Source Host : localhost:3306
Source Schema : a
Target Server Type : MySQL
Target Server Version : 80019
File Encoding : 65001
Date: 11/09/2020 11:15:48
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for casbin_rule
-- ----------------------------
DROP TABLE IF EXISTS `casbin_rule`;
CREATE TABLE `casbin_rule` (
`p_type` varchar(100) DEFAULT NULL,
`v0` varchar(100) DEFAULT NULL,
`v1` varchar(100) DEFAULT NULL,
`v2` varchar(100) DEFAULT NULL,
`v3` varchar(100) DEFAULT NULL,
`v4` varchar(100) DEFAULT NULL,
`v5` varchar(100) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- ----------------------------
-- Records of casbin_rule
-- ----------------------------
BEGIN;
INSERT INTO `casbin_rule` VALUES ('p', '888', '/base/login', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/base/register', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/api/createApi', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/api/getApiList', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/api/getApiById', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/api/deleteApi', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/api/updateApi', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/api/getAllApis', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/authority/createAuthority', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/authority/deleteAuthority', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/authority/getAuthorityList', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/authority/setDataAuthority', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/authority/updateAuthority', 'PUT', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/authority/copyAuthority', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/menu/getMenu', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/menu/getMenuList', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/menu/addBaseMenu', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/menu/getBaseMenuTree', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/menu/addMenuAuthority', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/menu/getMenuAuthority', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/menu/deleteBaseMenu', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/menu/updateBaseMenu', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/menu/getBaseMenuById', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/user/changePassword', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/user/getUserList', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/user/setUserAuthority', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/user/deleteUser', 'DELETE', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/fileUploadAndDownload/upload', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/fileUploadAndDownload/getFileList', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/fileUploadAndDownload/deleteFile', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/casbin/updateCasbin', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/casbin/getPolicyPathByAuthorityId', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/casbin/casbinTest/:pathParam', 'GET', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/jwt/jsonInBlacklist', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/system/getSystemConfig', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/system/setSystemConfig', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/customer/customer', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/customer/customer', 'PUT', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/customer/customer', 'DELETE', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/customer/customer', 'GET', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/customer/customerList', 'GET', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/autoCode/createTemp', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/autoCode/getTables', 'GET', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/autoCode/getDB', 'GET', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/autoCode/getColume', 'GET', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/sysDictionaryDetail/createSysDictionaryDetail', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/sysDictionaryDetail/deleteSysDictionaryDetail', 'DELETE', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/sysDictionaryDetail/updateSysDictionaryDetail', 'PUT', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/sysDictionaryDetail/findSysDictionaryDetail', 'GET', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/sysDictionaryDetail/getSysDictionaryDetailList', 'GET', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/sysDictionary/createSysDictionary', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/sysDictionary/deleteSysDictionary', 'DELETE', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/sysDictionary/updateSysDictionary', 'PUT', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/sysDictionary/findSysDictionary', 'GET', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/sysDictionary/getSysDictionaryList', 'GET', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/sysOperationRecord/createSysOperationRecord', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/sysOperationRecord/deleteSysOperationRecord', 'DELETE', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/sysOperationRecord/updateSysOperationRecord', 'PUT', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/sysOperationRecord/findSysOperationRecord', 'GET', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/sysOperationRecord/getSysOperationRecordList', 'GET', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/sysOperationRecord/deleteSysOperationRecordByIds', 'DELETE', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '888', '/user/setUserInfo', 'PUT', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/base/login', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/base/register', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/api/createApi', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/api/getApiList', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/api/getApiById', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/api/deleteApi', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/api/updateApi', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/api/getAllApis', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/authority/createAuthority', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/authority/deleteAuthority', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/authority/getAuthorityList', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/authority/setDataAuthority', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/menu/getMenu', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/menu/getMenuList', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/menu/addBaseMenu', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/menu/getBaseMenuTree', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/menu/addMenuAuthority', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/menu/getMenuAuthority', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/menu/deleteBaseMenu', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/menu/updateBaseMenu', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/menu/getBaseMenuById', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/user/changePassword', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/user/getUserList', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/user/setUserAuthority', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/fileUploadAndDownload/upload', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/fileUploadAndDownload/getFileList', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/fileUploadAndDownload/deleteFile', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/casbin/updateCasbin', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/casbin/getPolicyPathByAuthorityId', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/jwt/jsonInBlacklist', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/system/getSystemConfig', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/system/setSystemConfig', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/customer/customer', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/customer/customer', 'PUT', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/customer/customer', 'DELETE', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/customer/customer', 'GET', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/customer/customerList', 'GET', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/base/login', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/base/register', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/api/createApi', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/api/getApiList', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/api/getApiById', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/api/deleteApi', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/api/updateApi', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/api/getAllApis', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/authority/createAuthority', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/authority/deleteAuthority', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/authority/getAuthorityList', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/authority/setDataAuthority', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/menu/getMenu', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/menu/getMenuList', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/menu/addBaseMenu', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/menu/getBaseMenuTree', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/menu/addMenuAuthority', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/menu/getMenuAuthority', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/menu/deleteBaseMenu', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/menu/updateBaseMenu', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/menu/getBaseMenuById', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/user/changePassword', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/user/getUserList', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/user/setUserAuthority', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/fileUploadAndDownload/upload', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/fileUploadAndDownload/getFileList', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/fileUploadAndDownload/deleteFile', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/casbin/updateCasbin', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/casbin/getPolicyPathByAuthorityId', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/jwt/jsonInBlacklist', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/system/getSystemConfig', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/system/setSystemConfig', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/customer/customer', 'POST', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/customer/customer', 'PUT', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/customer/customer', 'DELETE', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/customer/customer', 'GET', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/customer/customerList', 'GET', NULL, NULL, NULL);
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/autoCode/createTemp', 'POST', NULL, NULL, NULL);
COMMIT;
-- ----------------------------
-- Table structure for exa_customers
-- ----------------------------
DROP TABLE IF EXISTS `exa_customers`;
CREATE TABLE `exa_customers` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
`deleted_at` datetime DEFAULT NULL,
`customer_name` varchar(191) DEFAULT NULL COMMENT '''客户名''',
`customer_phone_data` varchar(191) DEFAULT NULL COMMENT '''客户手机号''',
`sys_user_id` bigint unsigned DEFAULT NULL COMMENT '''管理ID''',
`sys_user_authority_id` varchar(191) DEFAULT NULL COMMENT '''管理角色ID''',
PRIMARY KEY (`id`),
KEY `idx_exa_customers_deleted_at` (`deleted_at`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- ----------------------------
-- Records of exa_customers
-- ----------------------------
BEGIN;
INSERT INTO `exa_customers` VALUES (1, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '测试客户', '1761111111', 1, '888');
COMMIT;
-- ----------------------------
-- Table structure for exa_file_chunks
-- ----------------------------
DROP TABLE IF EXISTS `exa_file_chunks`;
CREATE TABLE `exa_file_chunks` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
`deleted_at` datetime DEFAULT NULL,
`exa_file_id` bigint unsigned DEFAULT NULL,
`file_chunk_number` bigint DEFAULT NULL,
`file_chunk_path` varchar(191) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `idx_exa_file_chunks_deleted_at` (`deleted_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- ----------------------------
-- Table structure for exa_file_upload_and_downloads
-- ----------------------------
DROP TABLE IF EXISTS `exa_file_upload_and_downloads`;
CREATE TABLE `exa_file_upload_and_downloads` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
`deleted_at` datetime DEFAULT NULL,
`name` varchar(191) DEFAULT NULL COMMENT '''文件名''',
`url` varchar(191) DEFAULT NULL COMMENT '''文件地址''',
`tag` varchar(191) DEFAULT NULL COMMENT '''文件标签''',
`key` varchar(191) DEFAULT NULL COMMENT '''编号''',
PRIMARY KEY (`id`),
KEY `idx_exa_file_upload_and_downloads_deleted_at` (`deleted_at`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- ----------------------------
-- Records of exa_file_upload_and_downloads
-- ----------------------------
BEGIN;
INSERT INTO `exa_file_upload_and_downloads` VALUES (1, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '10.png', 'http://qmplusimg.henrongyi.top/gvalogo.png', 'png', '158787308910.png');
INSERT INTO `exa_file_upload_and_downloads` VALUES (2, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 'logo.png', 'http://qmplusimg.henrongyi.top/1576554439myAvatar.png', 'png', '1587973709logo.png');
COMMIT;
-- ----------------------------
-- Table structure for exa_files
-- ----------------------------
DROP TABLE IF EXISTS `exa_files`;
CREATE TABLE `exa_files` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
`deleted_at` datetime DEFAULT NULL,
`file_name` varchar(191) DEFAULT NULL,
`file_md5` varchar(191) DEFAULT NULL,
`file_path` varchar(191) DEFAULT NULL,
`chunk_total` bigint DEFAULT NULL,
`is_finish` tinyint(1) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `idx_exa_files_deleted_at` (`deleted_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- ----------------------------
-- Table structure for exa_simple_uploaders
-- ----------------------------
DROP TABLE IF EXISTS `exa_simple_uploaders`;
CREATE TABLE `exa_simple_uploaders` (
`chunk_number` varchar(191) DEFAULT NULL COMMENT '''当前切片标记''',
`current_chunk_size` varchar(191) DEFAULT NULL COMMENT '''当前切片容量''',
`current_chunk_path` varchar(191) DEFAULT NULL COMMENT '''切片本地路径''',
`total_size` varchar(191) DEFAULT NULL COMMENT '''总容量''',
`identifier` varchar(191) DEFAULT NULL COMMENT '''文件标识(md5)''',
`filename` varchar(191) DEFAULT NULL COMMENT '''文件名''',
`total_chunks` varchar(191) DEFAULT NULL COMMENT '''切片总数''',
`is_done` tinyint(1) DEFAULT NULL COMMENT '''是否上传完成''',
`file_path` varchar(191) DEFAULT NULL COMMENT '''文件本地路径'''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- ----------------------------
-- Table structure for jwt_blacklists
-- ----------------------------
DROP TABLE IF EXISTS `jwt_blacklists`;
CREATE TABLE `jwt_blacklists` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
`deleted_at` datetime DEFAULT NULL,
`jwt` text COMMENT '''jwt''',
PRIMARY KEY (`id`),
KEY `idx_jwt_blacklists_deleted_at` (`deleted_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- ----------------------------
-- Table structure for sys_apis
-- ----------------------------
DROP TABLE IF EXISTS `sys_apis`;
CREATE TABLE `sys_apis` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
`deleted_at` datetime DEFAULT NULL,
`path` varchar(191) DEFAULT NULL COMMENT '''api路径''',
`description` varchar(191) DEFAULT NULL COMMENT '''api中文描述''',
`api_group` varchar(191) DEFAULT NULL COMMENT '''api组''',
`method` varchar(191) DEFAULT 'POST',
PRIMARY KEY (`id`),
KEY `idx_sys_apis_deleted_at` (`deleted_at`)
) ENGINE=InnoDB AUTO_INCREMENT=66 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- ----------------------------
-- Records of sys_apis
-- ----------------------------
BEGIN;
INSERT INTO `sys_apis` VALUES (1, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/base/login', '用户登录', 'base', 'POST');
INSERT INTO `sys_apis` VALUES (2, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/base/register', '用户注册', 'base', 'POST');
INSERT INTO `sys_apis` VALUES (3, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/api/createApi', '创建api', 'api', 'POST');
INSERT INTO `sys_apis` VALUES (4, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/api/getApiList', '获取api列表', 'api', 'POST');
INSERT INTO `sys_apis` VALUES (5, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/api/getApiById', '获取api详细信息', 'api', 'POST');
INSERT INTO `sys_apis` VALUES (6, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/api/deleteApi', '删除Api', 'api', 'POST');
INSERT INTO `sys_apis` VALUES (7, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/api/updateApi', '更新Api', 'api', 'POST');
INSERT INTO `sys_apis` VALUES (8, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/api/getAllApis', '获取所有api', 'api', 'POST');
INSERT INTO `sys_apis` VALUES (9, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/authority/createAuthority', '创建角色', 'authority', 'POST');
INSERT INTO `sys_apis` VALUES (10, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/authority/deleteAuthority', '删除角色', 'authority', 'POST');
INSERT INTO `sys_apis` VALUES (11, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/authority/getAuthorityList', '获取角色列表', 'authority', 'POST');
INSERT INTO `sys_apis` VALUES (12, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/menu/getMenu', '获取菜单树', 'menu', 'POST');
INSERT INTO `sys_apis` VALUES (13, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/menu/getMenuList', '分页获取基础menu列表', 'menu', 'POST');
INSERT INTO `sys_apis` VALUES (14, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/menu/addBaseMenu', '新增菜单', 'menu', 'POST');
INSERT INTO `sys_apis` VALUES (15, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/menu/getBaseMenuTree', '获取用户动态路由', 'menu', 'POST');
INSERT INTO `sys_apis` VALUES (16, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/menu/addMenuAuthority', '增加menu和角色关联关系', 'menu', 'POST');
INSERT INTO `sys_apis` VALUES (17, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/menu/getMenuAuthority', '获取指定角色menu', 'menu', 'POST');
INSERT INTO `sys_apis` VALUES (18, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/menu/deleteBaseMenu', '删除菜单', 'menu', 'POST');
INSERT INTO `sys_apis` VALUES (19, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/menu/updateBaseMenu', '更新菜单', 'menu', 'POST');
INSERT INTO `sys_apis` VALUES (20, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/menu/getBaseMenuById', '根据id获取菜单', 'menu', 'POST');
INSERT INTO `sys_apis` VALUES (21, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/user/changePassword', '修改密码', 'user', 'POST');
INSERT INTO `sys_apis` VALUES (23, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/user/getUserList', '获取用户列表', 'user', 'POST');
INSERT INTO `sys_apis` VALUES (24, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/user/setUserAuthority', '修改用户角色', 'user', 'POST');
INSERT INTO `sys_apis` VALUES (25, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/fileUploadAndDownload/upload', '文件上传示例', 'fileUploadAndDownload', 'POST');
INSERT INTO `sys_apis` VALUES (26, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/fileUploadAndDownload/getFileList', '获取上传文件列表', 'fileUploadAndDownload', 'POST');
INSERT INTO `sys_apis` VALUES (27, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/casbin/updateCasbin', '更改角色api权限', 'casbin', 'POST');
INSERT INTO `sys_apis` VALUES (28, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/casbin/getPolicyPathByAuthorityId', '获取权限列表', 'casbin', 'POST');
INSERT INTO `sys_apis` VALUES (29, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/fileUploadAndDownload/deleteFile', '删除文件', 'fileUploadAndDownload', 'POST');
INSERT INTO `sys_apis` VALUES (30, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/jwt/jsonInBlacklist', 'jwt加入黑名单', 'jwt', 'POST');
INSERT INTO `sys_apis` VALUES (31, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/authority/setDataAuthority', '设置角色资源权限', 'authority', 'POST');
INSERT INTO `sys_apis` VALUES (32, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/system/getSystemConfig', '获取配置文件内容', 'system', 'POST');
INSERT INTO `sys_apis` VALUES (33, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/system/setSystemConfig', '设置配置文件内容', 'system', 'POST');
INSERT INTO `sys_apis` VALUES (34, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/customer/customer', '创建客户', 'customer', 'POST');
INSERT INTO `sys_apis` VALUES (35, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/customer/customer', '更新客户', 'customer', 'PUT');
INSERT INTO `sys_apis` VALUES (36, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/customer/customer', '删除客户', 'customer', 'DELETE');
INSERT INTO `sys_apis` VALUES (37, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/customer/customer', '获取单一客户', 'customer', 'GET');
INSERT INTO `sys_apis` VALUES (38, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/customer/customerList', '获取客户列表', 'customer', 'GET');
INSERT INTO `sys_apis` VALUES (39, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/casbin/casbinTest/:pathParam', 'RESTFUL模式测试', 'casbin', 'GET');
INSERT INTO `sys_apis` VALUES (40, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/autoCode/createTemp', '自动化代码', 'autoCode', 'POST');
INSERT INTO `sys_apis` VALUES (41, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/authority/updateAuthority', '更新角色信息', 'authority', 'PUT');
INSERT INTO `sys_apis` VALUES (42, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/authority/copyAuthority', '拷贝角色', 'authority', 'POST');
INSERT INTO `sys_apis` VALUES (43, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/user/deleteUser', '删除用户', 'user', 'DELETE');
INSERT INTO `sys_apis` VALUES (44, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/sysDictionaryDetail/createSysDictionaryDetail', '新增字典内容', 'sysDictionaryDetail', 'POST');
INSERT INTO `sys_apis` VALUES (45, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/sysDictionaryDetail/deleteSysDictionaryDetail', '删除字典内容', 'sysDictionaryDetail', 'DELETE');
INSERT INTO `sys_apis` VALUES (46, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/sysDictionaryDetail/updateSysDictionaryDetail', '更新字典内容', 'sysDictionaryDetail', 'PUT');
INSERT INTO `sys_apis` VALUES (47, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/sysDictionaryDetail/findSysDictionaryDetail', '根据ID获取字典内容', 'sysDictionaryDetail', 'GET');
INSERT INTO `sys_apis` VALUES (48, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/sysDictionaryDetail/getSysDictionaryDetailList', '获取字典内容列表', 'sysDictionaryDetail', 'GET');
INSERT INTO `sys_apis` VALUES (49, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/sysDictionary/createSysDictionary', '新增字典', 'sysDictionary', 'POST');
INSERT INTO `sys_apis` VALUES (50, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/sysDictionary/deleteSysDictionary', '删除字典', 'sysDictionary', 'DELETE');
INSERT INTO `sys_apis` VALUES (51, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/sysDictionary/updateSysDictionary', '更新字典', 'sysDictionary', 'PUT');
INSERT INTO `sys_apis` VALUES (52, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/sysDictionary/findSysDictionary', '根据ID获取字典', 'sysDictionary', 'GET');
INSERT INTO `sys_apis` VALUES (53, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/sysDictionary/getSysDictionaryList', '获取字典列表', 'sysDictionary', 'GET');
INSERT INTO `sys_apis` VALUES (54, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/sysOperationRecord/createSysOperationRecord', '新增操作记录', 'sysOperationRecord', 'POST');
INSERT INTO `sys_apis` VALUES (55, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/sysOperationRecord/deleteSysOperationRecord', '删除操作记录', 'sysOperationRecord', 'DELETE');
INSERT INTO `sys_apis` VALUES (56, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/sysOperationRecord/findSysOperationRecord', '根据ID获取操作记录', 'sysOperationRecord', 'GET');
INSERT INTO `sys_apis` VALUES (57, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/sysOperationRecord/getSysOperationRecordList', '获取操作记录列表', 'sysOperationRecord', 'GET');
INSERT INTO `sys_apis` VALUES (58, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/autoCode/getTables', '获取数据库表', 'autoCode', 'GET');
INSERT INTO `sys_apis` VALUES (59, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/autoCode/getDB', '获取所有数据库', 'autoCode', 'GET');
INSERT INTO `sys_apis` VALUES (60, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/autoCode/getColume', '获取所选table的所有字段', 'autoCode', 'GET');
INSERT INTO `sys_apis` VALUES (61, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/sysOperationRecord/deleteSysOperationRecordByIds', '批量删除操作历史', 'sysOperationRecord', 'DELETE');
INSERT INTO `sys_apis` VALUES (62, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/simpleUploader/upload', '插件版分片上传', 'simpleUploader', 'POST');
INSERT INTO `sys_apis` VALUES (63, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/simpleUploader/checkFileMd5', '文件完整度验证', 'simpleUploader', 'GET');
INSERT INTO `sys_apis` VALUES (64, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/simpleUploader/mergeFileMd5', '上传完成合并文件', 'simpleUploader', 'GET');
INSERT INTO `sys_apis` VALUES (65, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '/user/setUserInfo', '设置用户信息', 'user', 'PUT');
COMMIT;
-- ----------------------------
-- Table structure for sys_authorities
-- ----------------------------
DROP TABLE IF EXISTS `sys_authorities`;
CREATE TABLE `sys_authorities` (
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
`deleted_at` datetime DEFAULT NULL,
`authority_id` varchar(90) NOT NULL COMMENT '''角色ID''',
`authority_name` varchar(191) DEFAULT NULL COMMENT '''角色名''',
`parent_id` varchar(191) DEFAULT NULL COMMENT '''父角色ID''',
PRIMARY KEY (`authority_id`),
UNIQUE KEY `authority_id` (`authority_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- ----------------------------
-- Records of sys_authorities
-- ----------------------------
BEGIN;
INSERT INTO `sys_authorities` VALUES ('2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '888', '普通用户', '0');
INSERT INTO `sys_authorities` VALUES ('2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '8881', '普通用户子角色', '888');
INSERT INTO `sys_authorities` VALUES ('2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '9528', '测试角色', '0');
COMMIT;
-- ----------------------------
-- Table structure for sys_authority_menus
-- ----------------------------
DROP TABLE IF EXISTS `sys_authority_menus`;
CREATE TABLE `sys_authority_menus` (
`sys_base_menu_id` bigint unsigned NOT NULL,
`sys_authority_authority_id` varchar(90) NOT NULL COMMENT '''角色ID''',
PRIMARY KEY (`sys_base_menu_id`,`sys_authority_authority_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- ----------------------------
-- Records of sys_authority_menus
-- ----------------------------
BEGIN;
INSERT INTO `sys_authority_menus` VALUES (1, '888');
INSERT INTO `sys_authority_menus` VALUES (1, '8881');
INSERT INTO `sys_authority_menus` VALUES (1, '9528');
INSERT INTO `sys_authority_menus` VALUES (2, '888');
INSERT INTO `sys_authority_menus` VALUES (2, '8881');
INSERT INTO `sys_authority_menus` VALUES (2, '9528');
INSERT INTO `sys_authority_menus` VALUES (3, '888');
INSERT INTO `sys_authority_menus` VALUES (3, '9528');
INSERT INTO `sys_authority_menus` VALUES (4, '888');
INSERT INTO `sys_authority_menus` VALUES (4, '9528');
INSERT INTO `sys_authority_menus` VALUES (5, '888');
INSERT INTO `sys_authority_menus` VALUES (5, '9528');
INSERT INTO `sys_authority_menus` VALUES (6, '888');
INSERT INTO `sys_authority_menus` VALUES (6, '9528');
INSERT INTO `sys_authority_menus` VALUES (7, '888');
INSERT INTO `sys_authority_menus` VALUES (7, '9528');
INSERT INTO `sys_authority_menus` VALUES (8, '888');
INSERT INTO `sys_authority_menus` VALUES (8, '8881');
INSERT INTO `sys_authority_menus` VALUES (8, '9528');
INSERT INTO `sys_authority_menus` VALUES (9, '888');
INSERT INTO `sys_authority_menus` VALUES (9, '9528');
INSERT INTO `sys_authority_menus` VALUES (10, '888');
INSERT INTO `sys_authority_menus` VALUES (10, '9528');
INSERT INTO `sys_authority_menus` VALUES (11, '888');
INSERT INTO `sys_authority_menus` VALUES (11, '9528');
INSERT INTO `sys_authority_menus` VALUES (12, '888');
INSERT INTO `sys_authority_menus` VALUES (12, '9528');
INSERT INTO `sys_authority_menus` VALUES (13, '888');
INSERT INTO `sys_authority_menus` VALUES (13, '9528');
INSERT INTO `sys_authority_menus` VALUES (14, '888');
INSERT INTO `sys_authority_menus` VALUES (14, '9528');
INSERT INTO `sys_authority_menus` VALUES (15, '888');
INSERT INTO `sys_authority_menus` VALUES (15, '9528');
INSERT INTO `sys_authority_menus` VALUES (16, '888');
INSERT INTO `sys_authority_menus` VALUES (17, '888');
INSERT INTO `sys_authority_menus` VALUES (17, '8881');
INSERT INTO `sys_authority_menus` VALUES (17, '9528');
INSERT INTO `sys_authority_menus` VALUES (18, '888');
INSERT INTO `sys_authority_menus` VALUES (18, '8881');
INSERT INTO `sys_authority_menus` VALUES (18, '9528');
INSERT INTO `sys_authority_menus` VALUES (19, '888');
INSERT INTO `sys_authority_menus` VALUES (19, '8881');
INSERT INTO `sys_authority_menus` VALUES (19, '9528');
INSERT INTO `sys_authority_menus` VALUES (20, '888');
INSERT INTO `sys_authority_menus` VALUES (20, '8881');
INSERT INTO `sys_authority_menus` VALUES (20, '9528');
INSERT INTO `sys_authority_menus` VALUES (21, '888');
INSERT INTO `sys_authority_menus` VALUES (22, '888');
INSERT INTO `sys_authority_menus` VALUES (23, '888');
INSERT INTO `sys_authority_menus` VALUES (24, '888');
INSERT INTO `sys_authority_menus` VALUES (25, '888');
INSERT INTO `sys_authority_menus` VALUES (26, '888');
COMMIT;
-- ----------------------------
-- Table structure for sys_base_menu_parameters
-- ----------------------------
DROP TABLE IF EXISTS `sys_base_menu_parameters`;
CREATE TABLE `sys_base_menu_parameters` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
`deleted_at` datetime DEFAULT NULL,
`sys_base_menu_id` bigint unsigned DEFAULT NULL,
`type` varchar(191) DEFAULT NULL,
`key` varchar(191) DEFAULT NULL,
`value` varchar(191) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `idx_sys_base_menu_parameters_deleted_at` (`deleted_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- ----------------------------
-- Table structure for sys_base_menus
-- ----------------------------
DROP TABLE IF EXISTS `sys_base_menus`;
CREATE TABLE `sys_base_menus` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
`deleted_at` datetime DEFAULT NULL,
`menu_level` bigint unsigned DEFAULT NULL,
`parent_id` varchar(191) DEFAULT NULL COMMENT '''父菜单ID''',
`path` varchar(191) DEFAULT NULL COMMENT '''路由path''',
`name` varchar(191) DEFAULT NULL COMMENT '''路由name''',
`hidden` tinyint(1) DEFAULT NULL COMMENT '''是否在列表隐藏''',
`component` varchar(191) DEFAULT NULL COMMENT '''对应前端文件路径''',
`sort` bigint DEFAULT NULL COMMENT '''排序标记''',
`keep_alive` tinyint(1) DEFAULT NULL COMMENT '''附加属性''',
`default_menu` tinyint(1) DEFAULT NULL COMMENT '''附加属性''',
`title` varchar(191) DEFAULT NULL COMMENT '''附加属性''',
`icon` varchar(191) DEFAULT NULL COMMENT '''附加属性''',
PRIMARY KEY (`id`),
KEY `idx_sys_base_menus_deleted_at` (`deleted_at`)
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- ----------------------------
-- Records of sys_base_menus
-- ----------------------------
BEGIN;
INSERT INTO `sys_base_menus` VALUES (1, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 0, '0', 'dashboard', 'dashboard', 0, 'view/dashboard/index.vue', 1, 0, 0, '仪表盘', 'setting');
INSERT INTO `sys_base_menus` VALUES (2, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 0, '0', 'about', 'about', 0, 'view/about/index.vue', 7, 0, 0, '关于我们', 'info');
INSERT INTO `sys_base_menus` VALUES (3, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 0, '0', 'admin', 'superAdmin', 0, 'view/superAdmin/index.vue', 3, 0, 0, '超级管理员', 'user-solid');
INSERT INTO `sys_base_menus` VALUES (4, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 0, '3', 'authority', 'authority', 0, 'view/superAdmin/authority/authority.vue', 1, 0, 0, '角色管理', 's-custom');
INSERT INTO `sys_base_menus` VALUES (5, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 0, '3', 'menu', 'menu', 0, 'view/superAdmin/menu/menu.vue', 2, 1, 0, '菜单管理', 's-order');
INSERT INTO `sys_base_menus` VALUES (6, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 0, '3', 'api', 'api', 0, 'view/superAdmin/api/api.vue', 3, 1, 0, 'api管理', 's-platform');
INSERT INTO `sys_base_menus` VALUES (7, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 0, '3', 'user', 'user', 0, 'view/superAdmin/user/user.vue', 4, 0, 0, '用户管理', 'coordinate');
INSERT INTO `sys_base_menus` VALUES (8, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 0, '0', 'person', 'person', 1, 'view/person/person.vue', 4, 0, 0, '个人信息', 'message-solid');
INSERT INTO `sys_base_menus` VALUES (9, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 0, '0', 'example', 'example', 0, 'view/example/index.vue', 6, 0, 0, '示例文件', 's-management');
INSERT INTO `sys_base_menus` VALUES (10, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 0, '9', 'table', 'table', 0, 'view/example/table/table.vue', 1, 0, 0, '表格示例', 's-order');
INSERT INTO `sys_base_menus` VALUES (11, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 0, '9', 'form', 'form', 0, 'view/example/form/form.vue', 2, 0, 0, '表单示例', 'document');
INSERT INTO `sys_base_menus` VALUES (12, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 0, '9', 'rte', 'rte', 0, 'view/example/rte/rte.vue', 3, 0, 0, '富文本编辑器', 'reading');
INSERT INTO `sys_base_menus` VALUES (13, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 0, '9', 'excel', 'excel', 0, 'view/example/excel/excel.vue', 4, 0, 0, 'excel导入导出', 's-marketing');
INSERT INTO `sys_base_menus` VALUES (14, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 0, '9', 'upload', 'upload', 0, 'view/example/upload/upload.vue', 5, 0, 0, '上传下载', 'upload');
INSERT INTO `sys_base_menus` VALUES (15, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 0, '9', 'breakpoint', 'breakpoint', 0, 'view/example/breakpoint/breakpoint.vue', 6, 0, 0, '断点续传', 'upload');
INSERT INTO `sys_base_menus` VALUES (16, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 0, '9', 'customer', 'customer', 0, 'view/example/customer/customer.vue', 7, 0, 0, '客户列表(资源示例)', 's-custom');
INSERT INTO `sys_base_menus` VALUES (17, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 0, '0', 'systemTools', 'systemTools', 0, 'view/systemTools/index.vue', 5, 0, 0, '系统工具', 's-cooperation');
INSERT INTO `sys_base_menus` VALUES (18, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 0, '17', 'autoCode', 'autoCode', 0, 'view/systemTools/autoCode/index.vue', 1, 1, 0, '代码生成器', 'cpu');
INSERT INTO `sys_base_menus` VALUES (19, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 0, '17', 'formCreate', 'formCreate', 0, 'view/systemTools/formCreate/index.vue', 2, 1, 0, '表单生成器', 'magic-stick');
INSERT INTO `sys_base_menus` VALUES (20, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 0, '17', 'system', 'system', 0, 'view/systemTools/system/system.vue', 3, 0, 0, '系统配置', 's-operation');
INSERT INTO `sys_base_menus` VALUES (21, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 0, '0', 'iconList', 'iconList', 0, 'view/iconList/index.vue', 2, 0, 0, '图标集合', 'star-on');
INSERT INTO `sys_base_menus` VALUES (22, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 0, '3', 'dictionary', 'dictionary', 0, 'view/superAdmin/dictionary/sysDictionary.vue', 5, 0, 0, '字典管理', 'notebook-2');
INSERT INTO `sys_base_menus` VALUES (23, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 0, '3', 'dictionaryDetail/:id', 'dictionaryDetail', 1, 'view/superAdmin/dictionary/sysDictionaryDetail.vue', 1, 0, 0, '字典详情', 's-order');
INSERT INTO `sys_base_menus` VALUES (24, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 0, '3', 'operation', 'operation', 0, 'view/superAdmin/operation/sysOperationRecord.vue', 6, 0, 0, '操作历史', 'time');
INSERT INTO `sys_base_menus` VALUES (25, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 0, '9', 'simpleUploader', 'simpleUploader', 0, 'view/example/simpleUploader/simpleUploader', 6, 0, 0, '断点续传(插件版)', 'upload');
INSERT INTO `sys_base_menus` VALUES (26, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 0, '0', 'https://www.gin-vue-admin.com', 'https://www.gin-vue-admin.com', 0, '/', 0, 0, 0, '官方网站', 's-home');
COMMIT;
-- ----------------------------
-- Table structure for sys_data_authority_ids
-- ----------------------------
DROP TABLE IF EXISTS `sys_data_authority_ids`;
CREATE TABLE `sys_data_authority_ids` (
`sys_authority_authority_id` varchar(90) NOT NULL COMMENT '''角色ID''',
`data_authority_id_authority_id` varchar(90) NOT NULL COMMENT '''角色ID''',
PRIMARY KEY (`sys_authority_authority_id`,`data_authority_id_authority_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- ----------------------------
-- Records of sys_data_authority_ids
-- ----------------------------
BEGIN;
INSERT INTO `sys_data_authority_ids` VALUES ('888', '888');
INSERT INTO `sys_data_authority_ids` VALUES ('888', '8881');
INSERT INTO `sys_data_authority_ids` VALUES ('888', '9528');
INSERT INTO `sys_data_authority_ids` VALUES ('9528', '8881');
INSERT INTO `sys_data_authority_ids` VALUES ('9528', '9528');
COMMIT;
-- ----------------------------
-- Table structure for sys_dictionaries
-- ----------------------------
DROP TABLE IF EXISTS `sys_dictionaries`;
CREATE TABLE `sys_dictionaries` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
`deleted_at` datetime DEFAULT NULL,
`name` varchar(191) DEFAULT NULL COMMENT '''字典名(中)''',
`type` varchar(191) DEFAULT NULL COMMENT '''字典名(英)''',
`status` tinyint(1) DEFAULT NULL COMMENT '''状态''',
`desc` varchar(191) DEFAULT NULL COMMENT '''描述''',
PRIMARY KEY (`id`),
KEY `idx_sys_dictionaries_deleted_at` (`deleted_at`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- ----------------------------
-- Records of sys_dictionaries
-- ----------------------------
BEGIN;
INSERT INTO `sys_dictionaries` VALUES (1, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '性别', 'sex', 1, '性别字典');
INSERT INTO `sys_dictionaries` VALUES (2, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '数据库int类型', 'int', 1, 'int类型对应的数据库类型');
INSERT INTO `sys_dictionaries` VALUES (3, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '数据库时间日期类型', 'time.Time', 1, '数据库时间日期类型');
INSERT INTO `sys_dictionaries` VALUES (4, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '数据库浮点型', 'float64', 1, '数据库浮点型');
INSERT INTO `sys_dictionaries` VALUES (5, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '数据库字符串', 'string', 1, '数据库字符串');
INSERT INTO `sys_dictionaries` VALUES (6, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, '数据库bool类型', 'bool', 1, '数据库bool类型');
COMMIT;
-- ----------------------------
-- Table structure for sys_dictionary_details
-- ----------------------------
DROP TABLE IF EXISTS `sys_dictionary_details`;
CREATE TABLE `sys_dictionary_details` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
`deleted_at` datetime DEFAULT NULL,
`label` varchar(191) DEFAULT NULL COMMENT '''展示值''',
`value` bigint DEFAULT NULL COMMENT '''字典值''',
`status` tinyint(1) DEFAULT NULL COMMENT '''启用状态''',
`sort` bigint DEFAULT NULL COMMENT '''排序标记''',
`sys_dictionary_id` bigint unsigned DEFAULT NULL COMMENT '''关联标记''',
PRIMARY KEY (`id`),
KEY `idx_sys_dictionary_details_deleted_at` (`deleted_at`)
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- ----------------------------
-- Records of sys_dictionary_details
-- ----------------------------
BEGIN;
INSERT INTO `sys_dictionary_details` VALUES (1, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 'smallint', 1, 1, 1, 2);
INSERT INTO `sys_dictionary_details` VALUES (2, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 'mediumint', 2, 1, 2, 2);
INSERT INTO `sys_dictionary_details` VALUES (3, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 'int', 3, 1, 3, 2);
INSERT INTO `sys_dictionary_details` VALUES (4, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 'bigint', 4, 1, 4, 2);
INSERT INTO `sys_dictionary_details` VALUES (5, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 'data', 0, 1, 0, 3);
INSERT INTO `sys_dictionary_details` VALUES (6, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 'time', 1, 1, 1, 3);
INSERT INTO `sys_dictionary_details` VALUES (7, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 'year', 2, 1, 2, 3);
INSERT INTO `sys_dictionary_details` VALUES (8, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 'datetime', 3, 1, 3, 3);
INSERT INTO `sys_dictionary_details` VALUES (9, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 'timestamp', 5, 1, 5, 3);
INSERT INTO `sys_dictionary_details` VALUES (10, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 'float', 0, 1, 0, 4);
INSERT INTO `sys_dictionary_details` VALUES (11, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 'double', 1, 1, 1, 4);
INSERT INTO `sys_dictionary_details` VALUES (12, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 'decimal', 2, 1, 2, 4);
INSERT INTO `sys_dictionary_details` VALUES (13, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 'char', 0, 1, 0, 5);
INSERT INTO `sys_dictionary_details` VALUES (14, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 'varchar', 1, 1, 1, 5);
INSERT INTO `sys_dictionary_details` VALUES (15, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 'tinyblob', 2, 1, 2, 5);
INSERT INTO `sys_dictionary_details` VALUES (16, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 'tinytext', 3, 1, 3, 5);
INSERT INTO `sys_dictionary_details` VALUES (17, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 'text', 4, 1, 4, 5);
INSERT INTO `sys_dictionary_details` VALUES (18, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 'blob', 5, 1, 5, 5);
INSERT INTO `sys_dictionary_details` VALUES (19, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 'mediumblob', 6, 1, 6, 5);
INSERT INTO `sys_dictionary_details` VALUES (20, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 'mediumtext', 7, 1, 7, 5);
INSERT INTO `sys_dictionary_details` VALUES (21, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 'longblob', 8, 1, 8, 5);
INSERT INTO `sys_dictionary_details` VALUES (22, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 'longtext', 9, 1, 9, 5);
INSERT INTO `sys_dictionary_details` VALUES (23, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 'tinyint', 0, 1, 0, 6);
COMMIT;
-- ----------------------------
-- Table structure for sys_operation_records
-- ----------------------------
DROP TABLE IF EXISTS `sys_operation_records`;
CREATE TABLE `sys_operation_records` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
`deleted_at` datetime DEFAULT NULL,
`ip` varchar(191) DEFAULT NULL COMMENT '''请求ip''',
`method` varchar(191) DEFAULT NULL COMMENT '''''',
`path` varchar(191) DEFAULT NULL COMMENT '''''',
`status` bigint DEFAULT NULL COMMENT '''''',
`latency` bigint DEFAULT NULL COMMENT '''''',
`agent` varchar(191) DEFAULT NULL COMMENT '''''',
`error_message` varchar(191) DEFAULT NULL COMMENT '''''',
`body` varchar(191) DEFAULT NULL COMMENT '''请求Body''',
`resp` longtext COMMENT '''响应Body''',
`user_id` bigint unsigned DEFAULT NULL COMMENT '''''',
PRIMARY KEY (`id`),
KEY `idx_sys_operation_records_deleted_at` (`deleted_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- ----------------------------
-- Table structure for sys_users
-- ----------------------------
DROP TABLE IF EXISTS `sys_users`;
CREATE TABLE `sys_users` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
`deleted_at` datetime DEFAULT NULL,
`uuid` varchar(191) DEFAULT NULL COMMENT '''用户UUID''',
`username` varchar(191) DEFAULT NULL COMMENT '''用户登录名''',
`password` varchar(191) DEFAULT NULL COMMENT '''用户登录密码''',
`nick_name` varchar(191) DEFAULT '系统用户' COMMENT '''用户昵称''',
`header_img` varchar(191) DEFAULT 'http://qmplusimg.henrongyi.top/head.png' COMMENT '''用户头像''',
`authority_id` varchar(191) DEFAULT '888' COMMENT '''用户角色ID''',
PRIMARY KEY (`id`),
KEY `idx_sys_users_deleted_at` (`deleted_at`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- ----------------------------
-- Records of sys_users
-- ----------------------------
BEGIN;
INSERT INTO `sys_users` VALUES (1, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 'e0375086-c7fd-48f9-818b-044f3d83dac0', 'admin', 'e10adc3949ba59abbe56e057f20f883e', '超级管理员', 'http://qmplusimg.henrongyi.top/1571627762timg.jpg', '888');
INSERT INTO `sys_users` VALUES (2, '2020-09-11 11:14:42', '2020-09-11 11:14:42', NULL, 'acdd9a43-4d82-44ce-9b6e-8b70bd89d651', 'a303176530', '3ec063004a6f31642261936a379fde3d', 'QMPlusUser', 'http://qmplusimg.henrongyi.top/1572075907logo.png', '9528');
COMMIT;
-- ----------------------------
-- Table structure for sys_workflow_step_infos
-- ----------------------------
DROP TABLE IF EXISTS `sys_workflow_step_infos`;
CREATE TABLE `sys_workflow_step_infos` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
`deleted_at` datetime DEFAULT NULL,
`sys_workflow_id` bigint unsigned DEFAULT NULL COMMENT '''所属工作流ID''',
`is_strat` tinyint(1) DEFAULT NULL COMMENT '''是否是开始流节点''',
`step_name` varchar(191) DEFAULT NULL COMMENT '''工作流节点名称''',
`step_no` double DEFAULT NULL COMMENT '''步骤id (第几步)''',
`step_authority_id` varchar(191) DEFAULT NULL COMMENT '''操作者级别id''',
`is_end` tinyint(1) DEFAULT NULL COMMENT '''是否是完结流节点''',
PRIMARY KEY (`id`),
KEY `idx_sys_workflow_step_infos_deleted_at` (`deleted_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- ----------------------------
-- Table structure for sys_workflows
-- ----------------------------
DROP TABLE IF EXISTS `sys_workflows`;
CREATE TABLE `sys_workflows` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
`deleted_at` datetime DEFAULT NULL,
`workflow_nick_name` varchar(191) DEFAULT NULL COMMENT '''工作流中文名称''',
`workflow_name` varchar(191) DEFAULT NULL COMMENT '''工作流英文名称''',
`workflow_description` varchar(191) DEFAULT NULL COMMENT '''工作流描述''',
PRIMARY KEY (`id`),
KEY `idx_sys_workflows_deleted_at` (`deleted_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- ----------------------------
-- View structure for authority_menu
-- ----------------------------
DROP VIEW IF EXISTS `authority_menu`;
CREATE ALGORITHM = UNDEFINED SQL SECURITY DEFINER VIEW `authority_menu` AS select `sys_base_menus`.`id` AS `id`,`sys_base_menus`.`created_at` AS `created_at`,`sys_base_menus`.`updated_at` AS `updated_at`,`sys_base_menus`.`deleted_at` AS `deleted_at`,`sys_base_menus`.`menu_level` AS `menu_level`,`sys_base_menus`.`parent_id` AS `parent_id`,`sys_base_menus`.`path` AS `path`,`sys_base_menus`.`name` AS `name`,`sys_base_menus`.`hidden` AS `hidden`,`sys_base_menus`.`component` AS `component`,`sys_base_menus`.`title` AS `title`,`sys_base_menus`.`icon` AS `icon`,`sys_base_menus`.`sort` AS `sort`,`sys_authority_menus`.`sys_authority_authority_id` AS `authority_id`,`sys_authority_menus`.`sys_base_menu_id` AS `menu_id`,`sys_base_menus`.`keep_alive` AS `keep_alive`,`sys_base_menus`.`default_menu` AS `default_menu` from (`sys_authority_menus` join `sys_base_menus` on((`sys_authority_menus`.`sys_base_menu_id` = `sys_base_menus`.`id`)));
SET FOREIGN_KEY_CHECKS = 1;
+26
View File
@@ -0,0 +1,26 @@
server {
listen 8000;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root /usr/share/nginx/html;
add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
try_files $uri $uri/ /index.html;
}
location /api {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
rewrite ^/api/(.*)$ /$1 break; #重写
proxy_pass http://177.7.0.12:8888; # 设置代理服务器的协议和地址
}
location /api/swagger/index.html {
proxy_pass http://127.0.0.1:8888/swagger/index.html;
}
}
+93
View File
@@ -0,0 +1,93 @@
#! /bin/bash
rm -f ./config.yaml
# 生成config.yaml文件, 用于docker-compose的使用
touch ./config.yaml
filename="./config.yaml"
cat>"${filename}"<<EOF
# Gin-Vue-Admin Global Configuration
# casbin configuration
casbin:
model-path: './resource/rbac_model.conf'
# jwt configuration
jwt:
signing-key: 'qmPlus'
# mysql connect configuration
mysql:
username: root
password: 'Aa@6447985'
path: mysql
db-name: 'qmPlus'
config: 'charset=utf8mb4&parseTime=True&loc=Local'
max-idle-conns: 10
max-open-conns: 10
log-mode: true
#sqlite 配置
sqlite:
path: db.db
log-mode: true
config: 'loc=Asia/Shanghai'
# oss configuration
# 切换本地与七牛云上传,分配头像和文件路径
localupload:
local: false
avatar-path: uploads/avatar
file-path: uploads/file
# 请自行七牛申请对应的 公钥 私钥 bucket 和 域名地址
qiniu:
access-key: '25j8dYBZ2wuiy0yhwShytjZDTX662b8xiFguwxzZ'
secret-key: 'pgdbqEsf7ooZh7W3xokP833h3dZ_VecFXPDeG5JY'
bucket: 'qm-plus-img'
img-path: 'http://qmplusimg.henrongyi.top'
# redis configuration
redis:
addr: redis:6379
password: ''
db: 0
# system configuration
system:
use-multipoint: true
env: 'public' # Change to "develop" to skip authentication for development mode
addr: 8888
db-type: "mysql" # support mysql/sqlite
# captcha configuration
captcha:
key-long: 6
img-width: 240
img-height: 80
# zap logger configuration
zap:
# 可使用 "debug", "info", "warn", "error", "dpanic", "panic", "fatal",
level: 'info'
# console: 控制台, json: json格式输出
format: 'console'
prefix: '[GIN-VUE-ADMIN]'
director: 'log'
link-name: 'latest_log'
show-line: true
# LowercaseLevelEncoder:小写, LowercaseColorLevelEncoder:小写带颜色,CapitalLevelEncoder: 大写, CapitalColorLevelEncoder: 大写带颜色,
encode-level: 'LowercaseColorLevelEncoder'
stacktrace-key: 'stacktrace'
log-in-console: true
email:
email-from: 'xxx@163.com'
email-nickname: 'test'
email-secret: 'xxx'
email-to: 'xxx@qq.com'
email-host: 'smtp.163.com'
email-port: 465
email-isSSL: true
EOF
+1 -1
View File
@@ -9,4 +9,4 @@ community_bridge: # Replace with a single Community Bridge project-name e.g., cl
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: http://doc.henrongyi.top/more/coffee.html#%E6%8D%90%E8%B5%A0
custom: https://www.gin-vue-admin.com/docs/coffee
+375
View File
@@ -0,0 +1,375 @@
<div align=center>
<img src="http://qmplusimg.henrongyi.top/gvalogo.jpg" width=300" height="300" />
</div>
<div align=center>
<img src="https://img.shields.io/badge/golang-1.12-blue"/>
<img src="https://img.shields.io/badge/gin-1.4.0-lightBlue"/>
<img src="https://img.shields.io/badge/vue-2.6.10-brightgreen"/>
<img src="https://img.shields.io/badge/element--ui-2.12.0-green"/>
<img src="https://img.shields.io/badge/gorm-1.9.12-red"/>
</div>
English | [简体中文](./README.md)
# Project Guidelines
[Online Documentation](https://www.gin-vue-admin.com/) : https://www.gin-vue-admin.com/
[Development Steps](https://www.gin-vue-admin.com/docs/help) (Contributor: <a href="https://github.com/LLemonGreen">LLemonGreen</a> And <a href="https://github.com/fkk0509">Fann</a>)
- Web UI Framework:[element-ui](https://github.com/ElemeFE/element)
- Server Framework:[gin](https://github.com/gin-gonic/gin)
## 1. Basic Introduction
### 1.1 Project Introduction
[Online Demo](http://demo.gin-vue-admin.com/)
username:admin
password:123456
> Gin-vue-admin is a full-stack (frontend and backend separation) framework designed for management system.
> It integrates multiple functions, such as JWT authentication, dynamic routing, dynamic menu, casbin authentication, form generator, code generator, etc. So that you can focus more time on your business Requirements.
Hi! Thank you for choosing gin-vue-admin.
Gin-vue-admin is a full-stack (frontend and backend separation) framework for developers, designers and product managers.
We are excited that you are interested in contributing to gin-vue-admin. Before submitting your contribution though, please make sure to take a moment and read through the following guidelines.
### 1.2 Contributing Guide
#### 1.2.1 Issue Guidelines
- Issues are exclusively for bug reports, feature requests and design-related topics. Other questions may be closed directly. If any questions come up when you are using Element, please hit [Gitter](https://gitter.im/element-en/Lobby) for help.
- Before submitting an issue, please check if similar problems have already been issued.
#### 1.2.2 Pull Request Guidelines
- Fork this repository to your own account. Do not create branches here.
- Commit info should be formatted as `[File Name]: Info about commit.` (e.g. `README.md: Fix xxx bug`)
- <font color=red>Make sure PRs are created to `develop` branch instead of `master` branch.</font>
- If your PR fixes a bug, please provide a description about the related bug.
- Merging a PR takes two maintainers: one approves the changes after reviewing, and then the other reviews and merges.
### 1.3 Version list
- master: 2.0 code, for prod
- develop: 2.0 dev code, for test
- [gin-vue-admin_v2_dev](https://github.com/flipped-aurora/gin-vue-admin/tree/gin-vue-admin_v2_dev) (v2.0 [GormV1](https://v1.gorm.io) Stable branch)
- [gva_gormv2_dev](https://github.com/flipped-aurora/gin-vue-admin/tree/gva_gormv2_dev) (v2.0 [GormV2](https://v2.gorm.io) Development branch)
## 2. Getting started
```
- node version > v8.6.0
- golang version >= v1.11
- IDE recommendation: Goland
- We recommend you to apply for your own cloud service in QINIU. Replace the public key, private key, warehouse name and default url address with your own, so as not to mess up the test database.
```
> Use docker-compose to experience this project
- Installation docker-compose [Official document](https://docs.docker.com/compose/install/)
- ```shell script
# Install on Linux
# 1.1 Run this command to download the current stable version of Docker Compose
sudo curl -L "https://github.com/docker/compose/releases/download/1.26.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
# 1.2 Apply executable permissions to binary files
sudo chmod +x /usr/local/bin/docker-compose
```
- ```shell script
# Use Python's pip installation
pip3 install docker-compose -i https://pypi.tuna.tsinghua.edu.cn/simple
```
- Use Docker Desktop
- Windows: https://hub.docker.com/editions/community/docker-ce-desktop-windows
- Mac: https://hub.docker.com/editions/community/docker-ce-desktop-mac/
- Use git to clone this project
- ```git
git clone https://github.com/flipped-aurora/gin-vue-admin.git
```
- Use docker-compose up to start the startup project with one click
- ```shell script
# Use docker-compose to start four containers
docker-compose up
# If you modify some configuration options, you can use this command to repackage the image
docker-compose up --build
# Use docker-compose to start in the background
docker-compose up -d
```
- Web project preview [http://127.0.0.1:8000](http://127.0.0.1:8000)
- swagger APIs [http://127.0.0.1:8888/swagger/index.html](http://127.0.0.1:8888/swagger/index.html)
- If the internal ip of the server's 177.7.0.12 container is occupied, the place to be modified is
- Replace 177.7.0.12 on line 39 of [docker-compose.yaml](./docker-compose.yaml) with the ip you want
- Replace 177.7.0.12 in line 20 of [.docker-compose/nginx/conf.d/my.conf](./.docker-compose/nginx/conf.d/my.conf) with the ip you want
- docker-compose uses a custom docker network
- ```dockerfile
networks:
network:
ipam:
driver: default
config:
- subnet: '177.7.0.0/16'
```
- Subnet address, the default gateway is 177.7.0.1 (docker-compose V2 needs to write, V3 does not need),For specific information, see the [official document](https://docs.docker.com/compose/compose-file/#ipv4_address-ipv6_address)
- The default network name is gin-vue-admin_network, and the default is bridge mode
- If the subnet is modified, the ipv4_address of each service needs to be modified, and the ip of the server on line 20 of [.docker-compose/nginx/conf.d/my.conf](.docker-compose/nginx/conf.d/my.conf) also needs to be modified
> <font color=red>**Use docker-compose to deploy this project need attention**</font>
- For mysql database, please use a local database installed on the server disk.
- Avoid using mysql in the docker container, there may be write problems, io is lower than the host machine, docker's persistence mechanism problem
- [init.sql](.docker-compose/docker-entrypoint-initdb.d/init.sql) is for docker-compose ==experience this project==, prohibit the use of [init.sql](.docker-compose/docker-entrypoint-initdb.d/init.sql) to initialize project data, Database initialization[Please use this method](https://www.gin-vue-admin.com/docs/help#step1%EF%BC%9A%E6%95%B0%E6%8D%AE%E5%BA%93%E5%88%9D%E5%A7%8B%E5%8C%96)
- Use [init.sql](.docker-compose/docker-entrypoint-initdb.d/init.sql) to initialize all problems, please bear it yourself, and have nothing to do with this project
- When deploying using docker-compose of this project,Please modify the [nginx configuration](.docker-compose/nginx/conf.d/my.conf), mysql configuration, networks configuration, redis configuration corresponding to [docker-compose.yaml](./docker-compose.yaml), and make changes as needed.
### 2.1 Web
```bash
# clone the project
git clone https://github.com/piexlmax/gin-vue-admin.git
# enter the project directory
cd web
# install dependency
npm install
# develop
npm run serve
```
### 2.2 Server
```bash
# using go.mod
# install go modules
go list (go mod tidy)
# build the server
go build
```
> Zap log library usage guide && configuration guide
The configuration of the Zap log library selects zap under [config.yaml](./server/config.yaml)
```yaml
# zap logger configuration
zap:
level: 'debug'
format: 'console'
prefix: '[GIN-VUE-ADMIN]'
director: 'log'
link_name: 'latest_log'
show_line: true
encode_level: 'LowercaseColorLevelEncoder'
stacktrace_key: 'stacktrace'
log_in_console: true
```
| Configuration Name | Type Of Configuration | Description |
| ------------------ | --------------------- | ------------------------------------------------------------ |
| level | string | For a detailed description of the level mode, please see the official [zap documentation](https://pkg.go.dev/go.uber.org/zap?tab=doc#pkg-constants) <br />info: info mode, stack information without errors, only output information<br />debug: debug mode, stack details with errors<br />warn:warn mode<br />error: error mode, stack details with error<br />dpanic: dpanic mode<br />panic: panic mode<br />fatal: fatal mode<br /> |
| format | string | console: Output log in console format<br />json: json format output log |
| prefix | string | Log prefix |
| director | string | The folder to store the log can be modified, no need to create it manually |
| link_name | string | [A soft connection file](https://baike.baidu.com/item/%E8%BD%AF%E9%93%BE%E6%8E%A5) of link_name will be generated in the server directory, and the link is the latest log file of the director configuration item |
| show_line | bool | Display the line number, the default is true, it is not recommended to modify |
| encode_level | string | LowercaseLevelEncoder: lowercase<br /> LowercaseColorLevelEncoder: lowercase with color<br />CapitalLevelEncoder: uppercase<br />CapitalColorLevelEncoder: uppercase with color |
| stacktrace_key | string | The name of the stack, that is, the key of josn when outputting the log in json format |
| log_in_console | bool | Whether to output to the console, the default is true |
- Development environment || Debug environment configuration recommendations
- `level:debug`
- `format:console`
- `encode_level:LowercaseColorLevelEncoder`或者`encode_leve:CapitalColorLevelEncoder`
- Deployment environment configuration recommendations
- `level:error`
- `format:json`
- `encode_level: LowercaseLevelEncoder `或者 `encode_level:CapitalLevelEncoder`
- `log_in_console: false`
- <font color=red>Suggestions are only suggestions, you can proceed according to your own needs, and suggestions are for reference only</font>
### 2.3 API docs auto-generation using swagger
#### 2.3.1 install swagger
##### (1) Using VPN or outside mainland China
````
go get -u github.com/swaggo/swag/cmd/swag
````
##### (2) In mainland China
In mainland China, access to go.org/x is prohibited,we recommend [goproxy.io](https://goproxy.io/zh/)
````bash
If you are using Go version 1.13 and above (recommended)
# Enable Go Modules function
go env -w GO111MODULE=on
# Configure GOPROXY environment variables
go env -w GOPROXY=https://goproxy.io,direct
If you are using Go version 1.12 and below
go env -w GO111MODULE=on
go env -w GOPROXY=https://goproxy.io
# Use the following command to download swag
go get -u github.com/swaggo/swag/cmd/swag
````
#### 2.3.2 API docs generation
````
cd server
swag init
````
After executing the above command,`docs` will show in `server/`,then open your browser, jump into `http://localhost:8888/swagger/index.html` to see the swagger APIs.
## 3. Technical selection
- Frontend: using `Element-UI` based on vue,to code the page.
- Backend: using `Gin` to quickly build basic RESTful API. `Gin` is a web framework written in Go (Golang).
- DB: `MySql`(5.6.44),using `gorm` to implement data manipulation, added support for SQLite databases.
- Cache: using `Redis` to implement the recording of the JWT token of the currently active user and implement the multi-login restriction.
- API: using Swagger to auto generate APIs docs。
- Config: using `fsnotify` and `viper` to implement `yaml` config file。
- Log: using `go-logging` record logs。
## 4. Project Architecture
### 4.1 Architecture Diagram
![Architecture diagram](http://qmplusimg.henrongyi.top/gva/gin-vue-admin.png)
### 4.2 Front-end Detailed Design Diagram (Contributor: <a href="https://github.com/baobeisuper">baobeisuper</a>)
![Front-end Detailed Design Diagram](http://qmplusimg.henrongyi.top/naotu.png)
### 4.3 Project Layout
```
├─server (backend)
│ ├─api (API entrance)
│ ├─config (config file)
│ ├─core (core code)
│ ├─docs (swagger APIs docs)
│ ├─global (global objet)
│ ├─initialiaze (initialiazation)
│ ├─middleware (middle ware)
│ ├─model (model and services)
│ ├─resource (resources, such as static pages, templates)
│ ├─router (routers)
│ ├─service (services)
│ └─utils (common utilities)
└─web (frontend)
├─public (deploy templates)
└─src (source code)
├─api (frontend APIs)
├─assets (static files)
├─components(components)
├─router (frontend routers)
├─store (vuex state management)
├─style (common styles)
├─utils (frontend common utilitie)
└─view (pages)
```
## 5. Features
- Authority management: Authority management based on `jwt` and `casbin`.
- File upload & download: File upload operation based on Qiniu Cloud (In order to make it easier for everyone to test, I have provided various important tokens of my Qiniu test number, and I urge you not to make things a mess).
- Pagination Encapsulation:The frontend uses mixins to encapsulate paging, and the paging method can call mixins
- User management: The system administrator assigns user roles and role permissions.
- Role management: Create the main object of permission control, and then assign different API permissions and menu permissions to the role.
- Menu management: User dynamic menu configuration implementation, assigning different menus to different roles.
- API management: Different users can call different API permissions.
- Configuration management: The configuration file can be modified in the web page (the test environment does not provide this function).
- Rich text editor: Embed MarkDown editor function.
- Conditional search: Add an example of conditional search.
- Restful example: You can see sample APIs in user management module.
```
fontend code file: src\view\superAdmin\api\api.vue
backend code file: model\dnModel\api.go
```
- Multi-login restriction: Change `userMultipoint` to true in `system` in `config.yaml` (You need to configure redis and redis parameters yourself. During the test period, please report in time if there is a bug).
- Upload file by chunk:Provides examples of file upload and large file upload by chunk.
- Form Builder:With the help of [@form-generator](https://github.com/JakHuang/form-generator).
- Code generator: Providing backend with basic logic and simple curd code generator.
## 6. To-do list
- [ ] upload & export Excel
- [ ] e-chart
- [ ] workflow, task transfer function
- [ ] frontend independent mode, mock
## 7. Knowledge base
### 7.1 Team blog
> https://www.yuque.com/flipped-aurora
>
>There are video courses about frontend framework in our blo. If you think the project is helpful to you, you can add my personal WeChat:shouzi_1994,your comments is welcomed。
### 7.2 Video courses
(1) Development environment course
> Bilibili:https://www.bilibili.com/video/BV1Fg4y187Bw/
(2) Template course
> Bilibili:https://www.bilibili.com/video/BV16K4y1r7BD/
(3)2.0 version introduction and development experience
> Bilibili:https://www.bilibili.com/video/BV1aV411d7Gm#reply2831798461
(4) Golang basic course (coming soon)
> https://space.bilibili.com/322210472/channel/detail?cid=108884
## 8. Contacts
### 8.1 Groups
#### QQ group: 622360840
| QQ group |d
| :---: |
| <img src="http://qmplusimg.henrongyi.top/qq.jpg" width="180"/> |
#### Wechat group: comment "加入gin-vue-admin交流群"
| Wechat |
| :---: |
| <img width="150" src="http://qmplusimg.henrongyi.top/qrjjz.png">
#### [About Us](https://www.gin-vue-admin.com/about/)
## 9. Donate
If you find this project useful, you can buy author a glass of juice :tropical_drink: [here](https://www.gin-vue-admin.com/docs/coffee)
## 10. Commercial considerations
If you use this project for commercial purposes, please comply with the Apache2.0 agreement and retain the author's technical support statement.
-313
View File
@@ -1,313 +0,0 @@
<div align=center>
<img src="http://qmplusimg.henrongyi.top/gvalogo.jpg" width=300" height="300" />
</div>
<div align=center>
<img src="https://img.shields.io/badge/golang-1.12-blue"/>
<img src="https://img.shields.io/badge/gin-1.4.0-lightBlue"/>
<img src="https://img.shields.io/badge/vue-2.6.10-brightgreen"/>
<img src="https://img.shields.io/badge/element--ui-2.12.0-green"/>
<img src="https://img.shields.io/badge/gorm-1.9.12-red"/>
</div>
[English](./README.md) | 简体中文
# 项目文档
[在线文档](http://doc.henrongyi.top/)
[开发教学](http://doc.henrongyi.top/help/) (贡献者: <a href="https://github.com/LLemonGreen">LLemonGreen</a> And <a href="https://github.com/fkk0509">Fann</a>)
- 前端UI框架:[element-ui](https://github.com/ElemeFE/element)
- 后台框架:[gin](https://github.com/gin-gonic/gin)
## 1. 基本介绍
### 1.1 项目介绍
[在线预览](http://demo.gin-vue-admin.com/)
测试用户名:admin
测试密码:123456
> Gin-vue-admin是一个基于vue和gin开发的全栈前后端分离的后台管理系统,集成jwt鉴权,动态路由,动态菜单,casbin鉴权,表单生成器,代码生成器等功能,提供多种示例文件,让您把更多时间专注在业务开发上。
### 1.2 贡献指南
Hi! 首先感谢你使用 gin-vue-admin。
Gin-vue-admin 是一套为后台管理平台准备的一整套前后端分离架构式的开源框架,旨在快速搭建后台管理系统。
Gin-vue-admin 的成长离不开大家的支持,如果你愿意为 gin-vue-admin 贡献代码或提供建议,请阅读以下内容。
#### 1.2.1 Issue 规范
- issue 仅用于提交 Bug 或 Feature 以及设计相关的内容,其它内容可能会被直接关闭。如果你在使用时产生了疑问,请到 Slack 或 [Gitter](https://gitter.im/ElemeFE/element) 里咨询。
- 在提交 issue 之前,请搜索相关内容是否已被提出。
#### 1.2.2 Pull Request 规范
- 请先 fork 一份到自己的项目下,不要直接在仓库下建分支。
- commit 信息要以`[文件名]: 描述信息` 的形式填写,例如 `README.md: fix xxx bug`。
- <font color=red>确保 PR 是提交到 `develop` 分支,而不是 `master` 分支。</font>
- 如果是修复 bug,请在 PR 中给出描述信息。
- 合并代码需要两名维护人员参与:一人进行 review 后 approve,另一人再次 review,通过后即可合并。
### 1.3 版本列表
- master: 2.0, 用于生产环境
- develop: 2.0, 用于测试环境
- [gin-vue-admin_v2.0_dev](https://github.com/flipped-aurora/gin-vue-admin/tree/gin-vue-admin_v2_dev) (v2.0 不再兼容 v1.0)
- [gin-vue-admin_v1.0_stable](https://github.com/flipped-aurora/gin-vue-admin/tree/gin-vue-admin_v1_stable) (v1.0停止维护)
- [gin-vue-admin_v1.0_dev](https://github.com/flipped-aurora/gin-vue-admin/tree/gin-vue-admin_v1_dev) (v1.0停止维护)
## 2. 使用说明
> 使用docker-compose体验本项目
- 安装 docker-compose [官方文档](https://docs.docker.com/compose/install/)
- ```shell script
# 在Linux安装
# 1.1 运行此命令以下载Docker Compose的当前稳定版本
sudo curl -L "https://github.com/docker/compose/releases/download/1.26.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
# 1.2 将可执行权限应用于二进制文件
sudo chmod +x /usr/local/bin/docker-compose
```
- ```shell script
# 使用Python的pip安装
pip3 install docker-compose -i https://pypi.tuna.tsinghua.edu.cn/simple
```
- 使用 Docker Desktop
- Windows: https://hub.docker.com/editions/community/docker-ce-desktop-windows
- Mac: https://hub.docker.com/editions/community/docker-ce-desktop-mac/
- 使用git克隆本项目
- ```git
git clone https://github.com/flipped-aurora/gin-vue-admin.git
```
- 使用docker-compose up一键启动启动项目
- ```shell script
# 使用docker-compose启动四个容器
docker-compose up
# 如果您修改了某些配置选项,可以使用此命令重新打包镜像
docker-compose up --build
# 使用docker-compose 后台启动
docker-compose up -d
```
- web项目预览 [http://127.0.0.1:8888/admin](http://127.0.0.1:8888/admin)
- swagger文档 [http://127.0.0.1:8888/swagger/index.html](http://127.0.0.1:8888/swagger/index.html)
```
- node版本 > v8.6.0
- golang版本 >= v1.11
- IDE推荐:Goland
- 各位在clone项目以后,把db文件导入自己创建的库后,最好前往七牛云申请自己的空间地址。
- 替换掉项目中的七牛云公钥,私钥,仓名和默认url地址,以免发生测试文件数据错乱
```
### 2.1 web端
```bash
# clone the project
git clone https://github.com/piexlmax/gin-vue-admin.git
# enter the project directory
cd web
# install dependency
npm install
# develop
npm run serve
```
### 2.2 server端
```bash
# 使用 go.mod
# 安装go依赖包
go list (go mod tidy)
# 编译
go build
```
### 2.3 swagger自动化API文档
#### 2.3.1 安装 swagger
##### (1)可以翻墙
````
go get -u github.com/swaggo/swag/cmd/swag
````
##### (2)无法翻墙
由于国内没法安装 go.org/x 包下面的东西,推荐使用 [goproxy.io](https://goproxy.io/zh/)
```bash
如果您使用的 Go 版本是 1.13 及以上(推荐)
# 启用 Go Modules 功能
go env -w GO111MODULE=on
# 配置 GOPROXY 环境变量
go env -w GOPROXY=https://goproxy.io,direct
# 执行
go get -g -v github.com/swaggo/swag/cmd/swag
# 到GOPATH的/src/github.com/swaggo/swag/cmd/swag路径下执行
go install
```
#### 2.3.2 生成API文档
````
cd server
swag init
````
执行上面的命令后,server目录下会出现docs文件夹,登录http://localhost:8888/swagger/index.html,即可查看swagger文档
## 3. 技术选型
- 前端:用基于`vue`的`Element-UI`构建基础页面。
- 后端:用`Gin`快速搭建基础restful风格API,`Gin`是一个go语言编写的Web框架。
- 数据库:采用`MySql`(5.6.44)版本,使用`gorm`实现对数据库的基本操作,已添加对sqlite数据库的支持。
- 缓存:使用`Redis`实现记录当前活跃用户的`jwt`令牌并实现多点登录限制。
- API文档:使用`Swagger`构建自动化文档。
- 配置文件:使用`fsnotify`和`viper`实现`yaml`格式的配置文件。
- 日志:使用`go-logging`实现日志记录。
## 4. 项目架构
### 4.1 系统架构图
![系统架构图](http://qmplusimg.henrongyi.top/gva/gin-vue-admin.png)
### 4.2 前端详细设计图 (提供者:<a href="https://github.com/baobeisuper">baobeisuper</a>)
![前端详细设计图](http://qmplusimg.henrongyi.top/naotu.png)
### 4.3 目录结构
```
├─server (后端文件夹)
│ ├─api (API)
│ ├─config (配置包)
│ ├─core (內核)
│ ├─db (数据库脚本)
│ ├─docs (swagger文档目录)
│ ├─global (全局对象)
│ ├─initialiaze (初始化)
│ ├─middleware (中间件)
│ ├─model (结构体层)
│ ├─resource (资源)
│ ├─router (路由)
│ ├─service (服务)
│ └─utils (公共功能)
└─web (前端文件)
├─public (发布模板)
└─src (源码包)
├─api (向后台发送ajax的封装层)
├─assets (静态文件)
├─components(组件)
├─router (前端路由)
├─store (vuex 状态管理仓)
├─style (通用样式文件)
├─utils (前端工具库)
└─view (前端页面)
```
## 5. 主要功能
- 权限管理:基于`jwt`和`casbin`实现的权限管理
- 文件上传下载:实现基于七牛云的文件上传操作(为了方便大家测试,我公开了自己的七牛测试号的各种重要token,恳请大家不要乱传东西)
- 分页封装:前端使用mixins封装分页,分页方法调用mixins即可
- 用户管理:系统管理员分配用户角色和角色权限。
- 角色管理:创建权限控制的主要对象,可以给角色分配不同api权限和菜单权限。
- 菜单管理:实现用户动态菜单配置,实现不同角色不同菜单。
- api管理:不同用户可调用的api接口的权限不同。
- 配置管理:配置文件可前台修改(测试环境不开放此功能)。
- 富文本编辑器:MarkDown编辑器功能嵌入。
- 条件搜索:增加条件搜索示例。
- restful示例:可以参考用户管理模块中的示例API。
```
前端文件参考: src\view\superAdmin\api\api.vue
后台文件参考: model\dnModel\api.go
```
- 多点登录限制:需要在`config.yaml`中把`system`中的`useMultipoint`修改为true(需要自行配置Redis和Config中的Redis参数,测试阶段,有bug请及时反馈)。
- 分片长传:提供文件分片上传和大文件分片上传功能示例。
- 表单生成器:表单生成器借助 [@form-generator](https://github.com/JakHuang/form-generator)。
- 代码生成器:后台基础逻辑以及简单curd的代码生成器。
## 6. 计划任务
- [ ] 导入,导出Excel
- [ ] Echart图表支持
- [ ] 工作流,任务交接功能开发
- [ ] 单独前端使用模式以及数据模拟
## 7. 知识库
## 7.1 团队博客
> https://www.yuque.com/flipped-aurora
>
>内有前端框架教学视频。如果觉得项目对您有所帮助可以添加我的个人微信:shouzi_1994,欢迎您提出宝贵的需求。
## 7.2 教学视频
(1)环境搭建
> Bilibili:https://www.bilibili.com/video/BV1Fg4y187Bw/ (v1.0版本视频,v2.0操作相同目录不同)
(2)模板使用
> Bilibili:https://www.bilibili.com/video/BV16K4y1r7BD/ (v1.0版本视频,v2.0操作相同目录不同)
(3)2.0目录以及开发体验
> Bilibili:https://www.bilibili.com/video/BV1aV411d7Gm#reply2831798461
(4)golang基础教学视频录制中...
> https://space.bilibili.com/322210472/channel/detail?cid=108884
## 8. 联系方式
### 8.1 技术群
### QQ交流群:622360840
| QQ 群(满) |
| :---: |
| <img src="http://qmplusimg.henrongyi.top/qq.jpg" width="180"/> |
### 微信交流群
可以添加上面任意一位开发者,备注"加入gin-vue-admin交流群"
### 8.2 项目组成员
| 蒋 | 严 | 尹 | 杜 | 印 | 宋 |
| :---: | :---: | :---: | :---: | :---: | :---: |
| <img width="150" src="http://qmplusimg.henrongyi.top/qrjjz.png"> | <img width="150" src="http://qmplusimg.henrongyi.top/qryr.png"> | <img width="150" src="http://qmplusimg.henrongyi.top/qryx.png"> | <img width="150" src="http://qmplusimg.henrongyi.top/qrdjl.png"> | <img width="150" src="http://qmplusimg.henrongyi.top/qrygl.png"> | <img width="150" src="http://qmplusimg.henrongyi.top/qrsong.png"> |
| 昵称 | 项目职务 | 姓 |
| ---- | ---- | ---- |
| [@piexlmax](https://github.com/piexlmax) | 项目发起者 | 蒋 |
| [@Ruio9244](https://github.com/Ruio9244) | 架构师 | 严 |
| [@granty1](https://github.com/granty1) | 后台开发 | 印 |
| [@1319612909](https://github.com/1319612909) | 前端UI开发 | 杜 |
| [@krank666](https://github.com/krank666) | 前端开发 | 尹 |
| [@chen-chen-up](https://github.com/chen-chen-up) | 新手开发 | 宋 |
| [@SliverHorn](https://github.com/SliverHorn) | 社区管理员 | 赖 |
## 9. 捐赠
如果你觉得这个项目对你有帮助,你可以请作者喝饮料 :tropical_drink: [点我](http://doc.henrongyi.top/more/coffee.html)
## 10. 商用注意事项
如果您将此项目用于商业用途,请遵守Apache2.0协议并保留作者技术支持声明。
+231 -187
View File
@@ -1,4 +1,4 @@
<div align=center>
<img src="http://qmplusimg.henrongyi.top/gvalogo.jpg" width=300" height="300" />
</div>
@@ -10,112 +10,134 @@
<img src="https://img.shields.io/badge/gorm-1.9.12-red"/>
</div>
English | [简体中文](./README-zh_CN.md)
[English](./README-en.md) | 简体中文
# Project Guidelines
[Online Documentation](http://doc.henrongyi.top/)
# 项目文档
[在线文档](https://www.gin-vue-admin.com/) : https://www.gin-vue-admin.com/
[Development Steps](http://doc.henrongyi.top/help/) (Contributor: <a href="https://github.com/LLemonGreen">LLemonGreen</a> And <a href="https://github.com/fkk0509">Fann</a>)
- Web UI Framework:[element-ui](https://github.com/ElemeFE/element)
- Server Framework:[gin](https://github.com/gin-gonic/gin)
[开发教学](https://www.gin-vue-admin.com/docs/help) (贡献者: <a href="https://github.com/LLemonGreen">LLemonGreen</a> And <a href="https://github.com/fkk0509">Fann</a>)
- 前端UI框架:[element-ui](https://github.com/ElemeFE/element)
- 后台框架:[gin](https://github.com/gin-gonic/gin)
## 1. Basic Introduction
## 1. 基本介绍
### 1.1 Project Introduction
### 1.1 项目介绍
[Online Demo](http://demo.gin-vue-admin.com/)
[在线预览](http://demo.gin-vue-admin.com/)
username:admin
测试用户名:admin
password:123456
测试密码:123456
> Gin-vue-admin is a full-stack (frontend and backend separation) framework designed for management system.
> It integrates multiple functions, such as JWT authentication, dynamic routing, dynamic menu, casbin authentication, form generator, code generator, etc. So that you can focus more time on your business Requirements.
> Gin-vue-admin是一个基于vue和gin开发的全栈前后端分离的后台管理系统,集成jwt鉴权,动态路由,动态菜单,casbin鉴权,表单生成器,代码生成器等功能,提供多种示例文件,让您把更多时间专注在业务开发上。
Hi! Thank you for choosing gin-vue-admin.
### 1.2 贡献指南
Hi! 首先感谢你使用 gin-vue-admin。
Gin-vue-admin is a full-stack (frontend and backend separation) framework for developers, designers and product managers.
Gin-vue-admin 是一套为后台管理平台准备的一整套前后端分离架构式的开源框架,旨在快速搭建后台管理系统。
We are excited that you are interested in contributing to gin-vue-admin. Before submitting your contribution though, please make sure to take a moment and read through the following guidelines.
Gin-vue-admin 的成长离不开大家的支持,如果你愿意为 gin-vue-admin 贡献代码或提供建议,请阅读以下内容。
### 1.2 Contributing Guide
#### 1.2.1 Issue Guidelines
#### 1.2.1 Issue 规范
- issue 仅用于提交 Bug 或 Feature 以及设计相关的内容,其它内容可能会被直接关闭。如果你在使用时产生了疑问,请到 Slack 或 [Gitter](https://gitter.im/ElemeFE/element) 里咨询。
- Issues are exclusively for bug reports, feature requests and design-related topics. Other questions may be closed directly. If any questions come up when you are using Element, please hit [Gitter](https://gitter.im/element-en/Lobby) for help.
- 在提交 issue 之前,请搜索相关内容是否已被提出。
- Before submitting an issue, please check if similar problems have already been issued.
#### 1.2.2 Pull Request 规范
- 请先 fork 一份到自己的项目下,不要直接在仓库下建分支。
#### 1.2.2 Pull Request Guidelines
- commit 信息要以`[文件名]: 描述信息` 的形式填写,例如 `README.md: fix xxx bug`。
- Fork this repository to your own account. Do not create branches here.
- <font color=red>确保 PR 是提交到 `develop` 分支,而不是 `master` 分支。</font>
- Commit info should be formatted as `[File Name]: Info about commit.` (e.g. `README.md: Fix xxx bug`)
- 如果是修复 bug,请在 PR 中给出描述信息。
- <font color=red>Make sure PRs are created to `develop` branch instead of `master` branch.</font>
- 合并代码需要两名维护人员参与:一人进行 review 后 approve,另一人再次 review,通过后即可合并。
- If your PR fixes a bug, please provide a description about the related bug.
### 1.3 版本列表
- Merging a PR takes two maintainers: one approves the changes after reviewing, and then the other reviews and merges.
- master: 2.0, 用于生产环境
- develop: 2.0, 用于测试环境
- [gin-vue-admin_v2_dev](https://github.com/flipped-aurora/gin-vue-admin/tree/gin-vue-admin_v2_dev) (v2.0 [GormV1版本](https://v1.gorm.io)稳定分支)
- [gva_gormv2_dev](https://github.com/flipped-aurora/gin-vue-admin/tree/gva_gormv2_dev) (v2.0 [GormV2版本](https://v2.gorm.io)开发分支)
### 1.3 Version list
## 2. 使用说明
- master: 2.0 code, for prod
```
- node版本 > v8.6.0
- golang版本 >= v1.11
- IDE推荐:Goland
- gormv2版本初始化数据库可以利用批量创建功能,这里已经写好初始化代码,需要在main.go内打开 initialize.Data() 的注释即可
- 替换掉项目中的七牛云公钥,私钥,仓名和默认url地址,以免发生测试文件数据错乱
```
- develop: 2.0 dev code, for test
- [gin-vue-admin_v2.0_dev](https://github.com/flipped-aurora/gin-vue-admin/tree/gin-vue-admin_v2_dev) (v2.0 is no longer compatible with v1.0)
- [gin-vue-admin_v1.0_stable](https://github.com/flipped-aurora/gin-vue-admin/tree/gin-vue-admin_v1_stable) (stop maintenance)
- [gin-vue-admin_v1.0_dev](https://github.com/flipped-aurora/gin-vue-admin/tree/gin-vue-admin_v1_dev) (stop maintenance)
## 2. Getting started
> Use docker-compose to experience this project
- Installation docker-compose [Official document](https://docs.docker.com/compose/install/)
> 使用docker-compose体验本项目
- 安装 docker-compose [官方文档](https://docs.docker.com/compose/install/)
- ```shell script
# Install on Linux
# 1.1 Run this command to download the current stable version of Docker Compose
# 在Linux安装
# 1.1 运行此命令以下载Docker Compose的当前稳定版本
sudo curl -L "https://github.com/docker/compose/releases/download/1.26.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
# 1.2 Apply executable permissions to binary files
# 1.2 将可执行权限应用于二进制文件
sudo chmod +x /usr/local/bin/docker-compose
```
- ```shell script
# Use Python's pip installation
# 使用Python的pip安装
pip3 install docker-compose -i https://pypi.tuna.tsinghua.edu.cn/simple
```
- Use Docker Desktop
- 使用 Docker Desktop
- Windows: https://hub.docker.com/editions/community/docker-ce-desktop-windows
- Mac: https://hub.docker.com/editions/community/docker-ce-desktop-mac/
- Use git to clone this project
- 使用git克隆本项目
- ```git
git clone https://github.com/flipped-aurora/gin-vue-admin.git
```
- Use docker-compose up to start the startup project with one click
- 使用docker-compose up一键启动启动项目
- ```shell script
# Use docker-compose to start four containers
# 使用docker-compose启动四个容器
docker-compose up
# If you modify some configuration options, you can use this command to repackage the image
# 如果您修改了某些配置选项,可以使用此命令重新打包镜像
docker-compose up --build
# Use docker-compose to start in the background
# 使用docker-compose 后台启动
docker-compose up -d
```
- Web project preview [http://127.0.0.1:8888/admin](http://127.0.0.1:8888/admin)
- web项目预览 [http://127.0.0.1:8000](http://127.0.0.1:8000)
- swagger APIs [http://127.0.0.1:8888/swagger/index.html](http://127.0.0.1:8888/swagger/index.html)
- swagger文档 [http://127.0.0.1:8888/swagger/index.html](http://127.0.0.1:8888/swagger/index.html)
```
- node version > v8.6.0
- golang version >= v1.11
- IDE recommendation: Goland
- After you clone the project, use the scripts in directory db to create your own database.
- We recommend you to apply for your own cloud service in QINIU. Replace the public key, private key, warehouse name and default url address with your own, so as not to mess up the test database.
```
- 如果server的177.7.0.12这个容器内部ip被占用了,需要修改地方为
### 2.1 Web
- [docker-compose.yaml](./docker-compose.yaml)的第39行的177.7.0.12更换为你想要的ip
- [.docker-compose/nginx/conf.d/my.conf](./.docker-compose/nginx/conf.d/my.conf)的第20行的177.7.0.12更换为你想要的ip
- docker-compose使用自定义的一个docker网络
- ```dockerfile
networks:
network:
ipam:
driver: default
config:
- subnet: '177.7.0.0/16'
```
- 子网地址, 默认网关是177.7.0.1(docker-compose V2需要写,V3则不需要),具体信息看[官方文档](https://docs.docker.com/compose/compose-file/#ipv4_address-ipv6_address)
- 默认的network名为gin-vue-admin_network,默认是bridge模式
- 如果修改了子网,对应的每个service的ipv4_address都需要修改,还有[.docker-compose/nginx/conf.d/my.conf](./.docker-compose/nginx/conf.d/my.conf)的第20行的server的ip也需要修改
> <font color=red>**使用docker-compose进行部署本项目需注意的问题**</font>
- mysql数据库请使用装在服务器磁盘的本地数据库.
- 避免使用docker容器内的mysql,可能会出现写入的问题, io比宿主机低 docker的持久化机制问题
- [init.sql](.docker-compose/docker-entrypoint-initdb.d/init.sql)是给docker-compose进行<font color=red>体验本项目</font>的, 禁止[init.sql](.docker-compose/docker-entrypoint-initdb.d/init.sql)使用进行项目数据的初始化, 数据库初始化[请使用此方法](https://www.gin-vue-admin.com/docs/help#step1%EF%BC%9A%E6%95%B0%E6%8D%AE%E5%BA%93%E5%88%9D%E5%A7%8B%E5%8C%96)
- 使用[init.sql](.docker-compose/docker-entrypoint-initdb.d/init.sql)进行初始化出现的所有问题,请自行承担,与本项目无关
- 使用本项目的docker-compose进行部署时,请修改[docker-compose.yaml](./docker-compose.yaml)对应的[nginx配置](.docker-compose/nginx/conf.d/my.conf),mysql配置,networks配置,redis配置,按需自行更改.
### 2.1 web端
```bash
# clone the project
@@ -131,192 +153,214 @@ npm install
npm run serve
```
### 2.2 Server
### 2.2 server端
```bash
# using go.mod
# 使用 go.mod
# install go modules
# 安装go依赖包
go list (go mod tidy)
# build the server
# 编译
go build
```
### 2.3 API docs auto-generation using swagger
> Zap日志库使用指南&&配置指南
#### 2.3.1 install swagger
Zap日志库的配置选择在[config.yaml](./server/config.yaml)下的zap
##### (1) Using VPN or outside mainland China
```yaml
# zap logger configuration
zap:
level: 'debug'
format: 'console'
prefix: '[GIN-VUE-ADMIN]'
director: 'log'
link_name: 'latest_log'
show_line: true
encode_level: 'LowercaseColorLevelEncoder'
stacktrace_key: 'stacktrace'
log_in_console: true
```
| 配置名 | 配置的类型 | 说明 |
| -------------- | ---------- | ------------------------------------------------------------ |
| level | string | level的模式的详细说明,请看[zap官方文档](https://pkg.go.dev/go.uber.org/zap?tab=doc#pkg-constants) <br />info: info模式,无错误的堆栈信息,只输出信息<br />debug:debug模式,有错误的堆栈详细信息<br />warn:warn模式<br />error: error模式,有错误的堆栈详细信息<br />dpanic: dpanic模式<br />panic: panic模式<br />fatal: fatal模式<br /> |
| format | string | console: 控制台形式输出日志<br />json: json格式输出日志 |
| prefix | string | 日志的前缀 |
| director | string | 存放日志的文件夹,修改即可,不需要手动创建 |
| link_name | string | 在server目录下会生成一个link_name的[软连接文件](https://baike.baidu.com/item/%E8%BD%AF%E9%93%BE%E6%8E%A5),链接的是director配置项的最新日志文件 |
| show_line | bool | 显示行号, 默认为true,不建议修改 |
| encode_level | string | LowercaseLevelEncoder:小写<br /> LowercaseColorLevelEncoder:小写带颜色<br />CapitalLevelEncoder: 大写<br />CapitalColorLevelEncoder: 大写带颜色 |
| stacktrace_key | string | 堆栈的名称,即在json格式输出日志时的josn的key |
| log_in_console | bool | 是否输出到控制台,默认为true |
- 开发环境 || 调试环境配置建议
- `level:debug`
- `format:console`
- `encode_level:LowercaseColorLevelEncoder`或者`encode_leve:CapitalColorLevelEncoder`
- 部署环境配置建议
- `level:error`
- `format:json`
- `encode_level: LowercaseLevelEncoder `或者 `encode_level:CapitalLevelEncoder`
- `log_in_console: false`
- <font color=red>建议只是建议,按照自己的需求进行即可,给出建议仅供参考</font>
### 2.3 swagger自动化API文档
#### 2.3.1 安装 swagger
##### (1)可以翻墙
````
go get -u github.com/swaggo/swag/cmd/swag
````
##### (2) In mainland China
In mainland China, access to go.org/x is prohibited,we recommend [goproxy.io](https://goproxy.io/zh/)
##### (2)无法翻墙
````bash
由于国内没法安装 go.org/x 包下面的东西,推荐使用 [goproxy.io](https://goproxy.io/zh/)
If you are using Go version 1.13 and above (recommended)
# Enable Go Modules function
```bash
如果您使用的 Go 版本是 1.13 及以上(推荐)
# 启用 Go Modules 功能
go env -w GO111MODULE=on
# Configure GOPROXY environment variables
# 配置 GOPROXY 环境变量
go env -w GOPROXY=https://goproxy.io,direct
If you are using Go version 1.12 and below
go env -w GO111MODULE=on
go env -w GOPROXY=https://goproxy.io
# get swag
go get -g -v github.com/swaggo/swag/cmd/swag
# 使用如下命令下载swag
go get -u github.com/swaggo/swag/cmd/swag
```
# cd GOPATH/src/github.com/swaggo/swag/cmd/swag
go install
````
#### 2.3.2 API docs generation
#### 2.3.2 生成API文档
````
cd server
swag init
````
After executing the above command,`docs` will show in `server/`,then open your browser, jump into `http://localhost:8888/swagger/index.html` to see the swagger APIs.
执行上面的命令后,server目录下会出现docs文件夹,登录http://localhost:8888/swagger/index.html,即可查看swagger文档
## 3. Technical selection
## 3. 技术选型
- Frontend: using `Element-UI` based on vue,to code the page.
- Backend: using `Gin` to quickly build basic RESTful API. `Gin` is a web framework written in Go (Golang).
- DB: `MySql`(5.6.44),using `gorm` to implement data manipulation, added support for SQLite databases.
- Cache: using `Redis` to implement the recording of the JWT token of the currently active user and implement the multi-login restriction.
- API: using Swagger to auto generate APIs docs。
- Config: using `fsnotify` and `viper` to implement `yaml` config file。
- Log: using `go-logging` record logs。
- 前端:用基于`vue`的`Element-UI`构建基础页面。
- 后端:用`Gin`快速搭建基础restful风格API,`Gin`是一个go语言编写的Web框架。
- 数据库:采用`MySql`(5.6.44)版本,使用`gorm`实现对数据库的基本操作,已添加对sqlite数据库的支持。
- 缓存:使用`Redis`实现记录当前活跃用户的`jwt`令牌并实现多点登录限制。
- API文档:使用`Swagger`构建自动化文档。
- 配置文件:使用`fsnotify`和`viper`实现`yaml`格式的配置文件。
- 日志:使用`go-logging`实现日志记录。
## 4. Project Architecture
### 4.1 Architecture Diagram
## 4. 项目架构
### 4.1 系统架构图
![Architecture diagram](http://qmplusimg.henrongyi.top/gva/gin-vue-admin.png)
![系统架构图](http://qmplusimg.henrongyi.top/gva/gin-vue-admin.png)
### 4.2 Front-end Detailed Design Diagram (Contributor: <a href="https://github.com/baobeisuper">baobeisuper</a>)
### 4.2 前端详细设计图 (提供者:<a href="https://github.com/baobeisuper">baobeisuper</a>)
![Front-end Detailed Design Diagram](http://qmplusimg.henrongyi.top/naotu.png)
![前端详细设计图](http://qmplusimg.henrongyi.top/naotu.png)
### 4.3 Project Layout
### 4.3 目录结构
```
├─server (backend)
│ ├─api (API entrance)
│ ├─config (config file)
│ ├─core (core code)
│ ├─db (db scripts)
│ ├─docs (swagger APIs docs)
│ ├─global (global objet)
│ ├─initialiaze (initialiazation)
│ ├─middleware (middle ware)
│ ├─model (model and services)
│ ├─resource (resources, such as static pages, templates)
│ ├─router (routers)
│ ├─service (services)
│ └─utils (common utilities)
└─web (frontend)
├─public (deploy templates)
└─src (source code)
├─api (frontend APIs)
├─assets (static files)
├─components(components)
├─router (frontend routers)
├─store (vuex state management)
├─style (common styles)
├─utils (frontend common utilitie)
└─view (pages)
├─server (后端文件夹)
│ ├─api (API)
│ ├─config (配置包)
│ ├─core (內核)
│ ├─docs (swagger文档目录)
│ ├─global (全局对象)
│ ├─initialiaze (初始化)
│ ├─middleware (中间件)
│ ├─model (结构体层)
│ ├─resource (资源)
│ ├─router (路由)
│ ├─service (服务)
│ └─utils (公共功能)
└─web (前端文件)
├─public (发布模板)
└─src (源码包)
├─api (向后台发送ajax的封装层)
├─assets (静态文件)
├─components(组件)
├─router (前端路由)
├─store (vuex 状态管理仓)
├─style (通用样式文件)
├─utils (前端工具库)
└─view (前端页面)
```
## 5. Features
- Authority management: Authority management based on `jwt` and `casbin`.
- File upload & download: File upload operation based on Qiniu Cloud (In order to make it easier for everyone to test, I have provided various important tokens of my Qiniu test number, and I urge you not to make things a mess).
- Pagination Encapsulation:The frontend uses mixins to encapsulate paging, and the paging method can call mixins
- User management: The system administrator assigns user roles and role permissions.
- Role management: Create the main object of permission control, and then assign different API permissions and menu permissions to the role.
- Menu management: User dynamic menu configuration implementation, assigning different menus to different roles.
- API management: Different users can call different API permissions.
- Configuration management: The configuration file can be modified in the web page (the test environment does not provide this function).
- Rich text editor: Embed MarkDown editor function.
- Conditional search: Add an example of conditional search.
- Restful example: You can see sample APIs in user management module.
## 5. 主要功能
- 权限管理:基于`jwt`和`casbin`实现的权限管理
- 文件上传下载:实现基于七牛云的文件上传操作(为了方便大家测试,我公开了自己的七牛测试号的各种重要token,恳请大家不要乱传东西)
- 分页封装:前端使用mixins封装分页,分页方法调用mixins即可
- 用户管理:系统管理员分配用户角色和角色权限。
- 角色管理:创建权限控制的主要对象,可以给角色分配不同api权限和菜单权限。
- 菜单管理:实现用户动态菜单配置,实现不同角色不同菜单。
- api管理:不同用户可调用的api接口的权限不同。
- 配置管理:配置文件可前台修改(测试环境不开放此功能)。
- 富文本编辑器:MarkDown编辑器功能嵌入。
- 条件搜索:增加条件搜索示例。
- restful示例:可以参考用户管理模块中的示例API。
```
fontend code file: src\view\superAdmin\api\api.vue
backend code file: model\dnModel\api.go
前端文件参考: src\view\superAdmin\api\api.vue
后台文件参考: model\dnModel\api.go
```
- Multi-login restriction: Change `userMultipoint` to true in `system` in `config.yaml` (You need to configure redis and redis parameters yourself. During the test period, please report in time if there is a bug).
- Upload file by chunk:Provides examples of file upload and large file upload by chunk.
- Form Builder:With the help of [@form-generator](https://github.com/JakHuang/form-generator).
- Code generator: Providing backend with basic logic and simple curd code generator.
- 多点登录限制:需要在`config.yaml`中把`system`中的`useMultipoint`修改为true(需要自行配置Redis和Config中的Redis参数,测试阶段,有bug请及时反馈)。
- 分片长传:提供文件分片上传和大文件分片上传功能示例。
- 表单生成器:表单生成器借助 [@form-generator](https://github.com/JakHuang/form-generator)。
- 代码生成器:后台基础逻辑以及简单curd的代码生成器。
## 6. To-do list
## 6. 计划任务
- [ ] upload & export Excel
- [ ] e-chart
- [ ] workflow, task transfer function
- [ ] frontend independent mode, mock
- [ ] 导入,导出Excel
- [ ] Echart图表支持
- [ ] 工作流,任务交接功能开发
- [ ] 单独前端使用模式以及数据模拟
## 7. Knowledge base
### 7.1 Team blog
## 7. 知识库
## 7.1 团队博客
> https://www.yuque.com/flipped-aurora
>
>There are video courses about frontend framework in our blo. If you think the project is helpful to you, you can add my personal WeChat:shouzi_1994,your comments is welcomed。
>内有前端框架教学视频。如果觉得项目对您有所帮助可以添加我的个人微信:shouzi_1994,欢迎您提出宝贵的需求。
### 7.2 Video courses
## 7.2 教学视频
(1) Development environment course
> Bilibili:https://www.bilibili.com/video/BV1Fg4y187Bw/
(2) Template course
> Bilibili:https://www.bilibili.com/video/BV16K4y1r7BD/
(1)环境搭建
> Bilibili:https://www.bilibili.com/video/BV1Fg4y187Bw/ (v1.0版本视频,v2.0操作相同目录不同)
(3)2.0 version introduction and development experience
(2)模板使用
> Bilibili:https://www.bilibili.com/video/BV16K4y1r7BD/ (v1.0版本视频,v2.0操作相同目录不同)
(3)2.0目录以及开发体验
> Bilibili:https://www.bilibili.com/video/BV1aV411d7Gm#reply2831798461
(4) Golang basic course (coming soon)
(4)golang基础教学视频录制中...
> https://space.bilibili.com/322210472/channel/detail?cid=108884
## 8. Contacts
### 8.1 Groups
#### QQ group: 622360840
## 8. 联系方式
| QQ group |
| :---: |
### 8.1 技术群
### QQ交流群:622360840
| QQ 群 |
| :---: |
| <img src="http://qmplusimg.henrongyi.top/qq.jpg" width="180"/> |
### 微信交流群
| 微信 |
| :---: |
| <img width="150" src="http://qmplusimg.henrongyi.top/qrjjz.png">
#### Wechat group: add anyone above, comment "加入gin-vue-admin交流群"
添加微信,备注"加入gin-vue-admin交流群"
### 8.2 Team members
| Jiang | Yan | Yin | Du | Yin | Song |
| :---: | :---: | :---: | :---: | :---: | :---: |
| <img width="150" src="http://qmplusimg.henrongyi.top/qrjjz.png"> | <img width="150" src="http://qmplusimg.henrongyi.top/qryr.png"> | <img width="150" src="http://qmplusimg.henrongyi.top/qryx.png"> | <img width="150" src="http://qmplusimg.henrongyi.top/qrdjl.png"> | <img width="150" src="http://qmplusimg.henrongyi.top/qrygl.png"> | <img width="150" src="http://qmplusimg.henrongyi.top/qrsong.png"> |
### [关于我们](https://www.gin-vue-admin.com/about/)
| Nick name | Project position | First name |
| ---- | ---- | ---- |
| [@piexlmax](https://github.com/piexlmax) | Project sponsor | Jiang |
| [@Ruio9244](https://github.com/Ruio9244) | Architect | Yan |
| [@granty1](https://github.com/granty1) | Backend developer | Yin |
| [@1319612909](https://github.com/1319612909) | UI developer | Du |
| [@krank666](https://github.com/krank666) | Frontend developer | Yin |
| [@chen-chen-up](https://github.com/chen-chen-up) | Novice developer | Song |
| [@SliverHorn](https://github.com/SliverHorn) | Community Administrator | Lai |
## 9. 捐赠
## 9. Donate
如果你觉得这个项目对你有帮助,你可以请作者喝饮料 :tropical_drink: [点我](https://www.gin-vue-admin.com/docs/coffee)
If you find this project useful, you can buy author a glass of juice :tropical_drink: [here](http://doc.henrongyi.top/more/coffee.html)
## 10. 商用注意事项
## 10. Commercial considerations
If you use this project for commercial purposes, please comply with the Apache2.0 agreement and retain the author's technical support statement.
如果您将此项目用于商业用途,请遵守Apache2.0协议并保留作者技术支持声明。
+39 -5
View File
@@ -1,31 +1,65 @@
version: "3.8"
networks:
network:
ipam:
driver: default
config:
- subnet: '177.7.0.0/16'
services:
web:
build:
context: ./
dockerfile: ./dockerfile_web
container_name: gva-web
restart: always
ports:
- '8000:8000'
depends_on:
- server
command: [ 'nginx-debug', '-g', 'daemon off;' ]
networks:
network:
ipv4_address: 177.7.0.11
server:
build:
context: ./
dockerfile: ./dockerfile_server
container_name: gva-server # 容器名
container_name: gva-server
restart: always
ports:
- '8888:8888'
depends_on:
- mysql
- redis
networks:
network:
ipv4_address: 177.7.0.12
mysql:
image: registry.cn-shanghai.aliyuncs.com/gva/gva-mysql:1.1
image: mysql:8.0.21
container_name: gva-mysql
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci #设置utf8字符集
restart: always
ports:
- "13306:3306" # host物理直接映射端口为6606
- "13306:3306" # host物理直接映射端口为13306
environment:
MYSQL_ROOT_PASSWORD: "Aa@6447985" # root管理员用户密码
MYSQL_DATABASE: 'qmPlus' # 初始化启动时要创建的数据库的名称
MYSQL_ROOT_PASSWORD: 'Aa@6447985' # root管理员用户密码
volumes:
- '.docker-compose/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d'
networks:
network:
ipv4_address: 177.7.0.13
redis:
image: redis:6.0.6
container_name: gva-redis # 容器名
restart: always
ports:
- '6379:6379'
- '6379:6379'
networks:
network:
ipv4_address: 177.7.0.14
Executable → Regular
View File
-112
View File
@@ -1,112 +0,0 @@
#! /bin/bash
rm -f ./core/server.go
# 生成server.go文件, 添加Router.Static("/admin", "./resource/dist")这个代码
touch ./core/server.go
filename="./core/server.go"
cat>"${filename}"<<EOF
package core
import (
"fmt"
"gin-vue-admin/global"
"gin-vue-admin/initialize"
"time"
)
type server interface {
ListenAndServe() error
}
func RunWindowsServer() {
if global.GVA_CONFIG.System.UseMultipoint {
// 初始化redis服务
initialize.Redis()
}
Router := initialize.Routers()
Router.Static("/form-generator", "./resource/page")
Router.Static("/admin", "./resource/dist")
//InstallPlugs(Router)
// end 插件描述
address := fmt.Sprintf(":%d", global.GVA_CONFIG.System.Addr)
s := initServer(address, Router)
// 保证文本顺序输出
// In order to ensure that the text order output can be deleted
time.Sleep(10 * time.Microsecond)
global.GVA_LOG.Debug("server run success on ", address)
fmt.Printf("欢迎使用 Gin-Vue-Admin默认自动化文档地址:http://127.0.0.1%s/swagger/index.html\n 默认前端文件运行地址:http://127.0.0.1:8888/admin\n", address)
global.GVA_LOG.Error(s.ListenAndServe())
}
EOF
rm -f ./config.yaml
# 生成config.yaml文件, 用于docker-compose的使用
touch ./config.yaml
filename="./config.yaml"
cat>"${filename}"<<EOF
# Gin-Vue-Admin Global Configuration
# casbin configuration
casbin:
model-path: './resource/rbac_model.conf'
# jwt configuration
jwt:
signing-key: 'qmPlus'
# mysql connect configuration
mysql:
username: root
password: 'Aa@6447985'
path: mysql
db-name: 'qmPlus'
config: 'charset=utf8&parseTime=True&loc=Local'
max-idle-conns: 10
max-open-conns: 10
log-mode: true
#sqlite 配置
sqlite:
path: db.db
log-mode: true
config: 'loc=Asia/Shanghai'
# oss configuration
# 请自行七牛申请对应的 公钥 私钥 bucket 和 域名地址
qiniu:
access-key: '25j8dYBZ2wuiy0yhwShytjZDTX662b8xiFguwxzZ'
secret-key: 'pgdbqEsf7ooZh7W3xokP833h3dZ_VecFXPDeG5JY'
bucket: 'qm-plus-img'
img-path: 'http://qmplusimg.henrongyi.top'
# redis configuration
redis:
addr: redis:6379
password: ''
db: 0
# system configuration
system:
use-multipoint: true
env: 'public' # Change to "develop" to skip authentication for development mode
addr: 8888
db-type: "mysql" # support mysql/sqlite
# captcha configuration
captcha:
key-long: 6
img-width: 240
img-height: 80
# logger configuration
log:
prefix: '[GIN-VUE-ADMIN]'
log-file: true
stdout: 'DEBUG'
file: 'DEBUG'
EOF
-10
View File
@@ -1,10 +0,0 @@
#! /bin/bash
rm -f .env.production
touch .env.production
filename="./.env.production"
cat>"${filename}"<<EOF
ENV = 'production'
VUE_APP_BASE_API = ''
EOF
+11 -33
View File
@@ -1,52 +1,30 @@
FROM node:12.16.1 as gva-web
WORKDIR /gva_web/
COPY web/ .
RUN cat .env.production
COPY docker/web-handle.sh .
RUN sh ./web-handle.sh
RUN cat .env.production
RUN rm -f web-handle.sh
RUN npm install -g cnpm --registry=https://registry.npm.taobao.org
RUN cnpm install || npm install
RUN npm run build
FROM golang:alpine as gva-server
FROM golang:alpine
ENV GO111MODULE=on
ENV GOPROXY=https://goproxy.io,direct
WORKDIR /go/src/gin-vue-admin
COPY server/ ./
RUN cat ./core/server.go
RUN cat ./config.yaml
COPY docker/server-handle.sh .
COPY .docker-compose/shell/server-handle.sh .
RUN ls -al
RUN sh ./server-handle.sh
RUN rm -f server-handle.sh
RUN cat ./core/server.go
RUN cat ./config.yaml
RUN go env && go list && go build -o gva-server .
RUN go env && go build -o server .
FROM nginx:alpine
LABEL MAINTAINER="SliverHorn"
FROM alpine:latest
LABEL MAINTAINER="SliverHorn@sliver_horn@qq.com"
WORKDIR gva/
WORKDIR /go/src/gin-vue-admin
# copy web
COPY --from=gva-web /gva_web/dist ./resource/dist
# copy server
COPY --from=gva-server /go/src/gin-vue-admin/gva-server ./
COPY --from=gva-server /go/src/gin-vue-admin/config.yaml ./
COPY --from=gva-server /go/src/gin-vue-admin/resource ./resource
COPY --from=0 /go/src/gin-vue-admin/server ./
COPY --from=0 /go/src/gin-vue-admin/config.yaml ./
COPY --from=0 /go/src/gin-vue-admin/resource ./resource
EXPOSE 8888
ENTRYPOINT ./gva-server
ENTRYPOINT ./server
# 根据Dockerfile生成Docker镜像
+18
View File
@@ -0,0 +1,18 @@
FROM node:12.16.1
WORKDIR /gva_web/
COPY web/ .
RUN npm install -g cnpm --registry=https://registry.npm.taobao.org
RUN cnpm install || npm install
RUN npm run build
FROM nginx:alpine
LABEL MAINTAINER="SliverHorn@sliver_horn@qq.com"
COPY .docker-compose/nginx/conf.d/my.conf /etc/nginx/conf.d/my.conf
COPY --from=0 /gva_web/dist /usr/share/nginx/html
RUN cat /etc/nginx/nginx.conf
RUN cat /etc/nginx/conf.d/my.conf
RUN ls -al /usr/share/nginx/html
CMD ls -al /usr/share/nginx/html
+12 -2
View File
@@ -2,6 +2,7 @@ package v1
import (
"fmt"
"gin-vue-admin/global"
"gin-vue-admin/global/response"
"gin-vue-admin/model"
"gin-vue-admin/model/request"
@@ -27,8 +28,17 @@ func UploadFile(c *gin.Context) {
response.FailWithMessage(fmt.Sprintf("上传文件失败,%v", err), c)
} else {
// 文件上传后拿到文件路径
err, filePath, key := utils.Upload(header)
if err != nil {
var uploadErr error
var filePath string
var key string
if global.GVA_CONFIG.LocalUpload.Local {
// 本地上传
uploadErr, filePath, key = utils.UploadFileLocal(header)
} else {
// 七牛云上传
uploadErr, filePath, key = utils.UploadRemote(header)
}
if uploadErr != nil {
response.FailWithMessage(fmt.Sprintf("接收返回值失败,%v", err), c)
} else {
// 修改数据库后得到修改后的user并且返回供前端使用
-14
View File
@@ -54,17 +54,3 @@ func GetPolicyPathByAuthorityId(c *gin.Context) {
response.OkWithData(resp.PolicyPathResponse{Paths: paths}, c)
}
// @Tags casbin
// @Summary casb RBAC RESTFUL测试路由
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.CasbinInReceive true "获取权限列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /casbin/CasbinTest [get]
func CasbinTest(c *gin.Context) {
// 测试restful以及占位符代码 随意书写
pathParam := c.Param("pathParam")
query := c.Query("query")
response.OkDetailed(gin.H{"pathParam": pathParam, "query": query}, "获取规则成功", c)
}
+23
View File
@@ -0,0 +1,23 @@
package v1
import (
"fmt"
"gin-vue-admin/global/response"
"gin-vue-admin/service"
"github.com/gin-gonic/gin"
)
// @Tags system
// @Summary 发送测试邮件
// @Security ApiKeyAuth
// @Produce application/json
// @Success 200 {string} string "{"success":true,"data":{},"msg":"返回成功"}"
// @Router /email/emailTest [post]
func EmailTest(c *gin.Context) {
err := service.EmailTest()
if err != nil {
response.FailWithMessage(fmt.Sprintf("发送失败,%v", err), c)
} else {
response.OkWithData("发送成功", c)
}
}
-19
View File
@@ -67,25 +67,6 @@ func DeleteSysOperationRecordByIds(c *gin.Context) {
}
}
// @Tags SysOperationRecord
// @Summary 更新SysOperationRecord
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.SysOperationRecord true "更新SysOperationRecord"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /sysOperationRecord/updateSysOperationRecord [put]
func UpdateSysOperationRecord(c *gin.Context) {
var sysOperationRecord model.SysOperationRecord
_ = c.ShouldBindJSON(&sysOperationRecord)
err := service.UpdateSysOperationRecord(&sysOperationRecord)
if err != nil {
response.FailWithMessage(fmt.Sprintf("更新失败,%v", err), c)
} else {
response.OkWithMessage("更新成功", c)
}
}
// @Tags SysOperationRecord
// @Summary 用id查询SysOperationRecord
// @Security ApiKeyAuth
+22 -37
View File
@@ -90,7 +90,7 @@ func tokenNext(c *gin.Context, user model.SysUser) {
NickName: user.NickName,
Username: user.Username,
AuthorityId: user.AuthorityId,
BufferTime: 60*60*24, // 缓冲时间1天 缓冲时间内会获得新的token刷新令牌 此时一个用户会存在两个有效令牌 但是前端只留一个 另一个会丢失
BufferTime: 60 * 60 * 24, // 缓冲时间1天 缓冲时间内会获得新的token刷新令牌 此时一个用户会存在两个有效令牌 但是前端只留一个 另一个会丢失
StandardClaims: jwt.StandardClaims{
NotBefore: time.Now().Unix() - 1000, // 签名生效时间
ExpiresAt: time.Now().Unix() + 60*60*24*7, // 过期时间 7天
@@ -174,42 +174,6 @@ type UserHeaderImg struct {
HeaderImg multipart.File `json:"headerImg"`
}
// @Tags SysUser
// @Summary 用户上传头像
// @Security ApiKeyAuth
// @accept multipart/form-data
// @Produce application/json
// @Param headerImg formData file true "用户上传头像"
// @Param username formData string true "用户上传头像"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"上传成功"}"
// @Router /user/uploadHeaderImg [post]
func UploadHeaderImg(c *gin.Context) {
claims, _ := c.Get("claims")
// 获取头像文件
// 这里我们通过断言获取 claims内的所有内容
waitUse := claims.(*request.CustomClaims)
uuid := waitUse.UUID
_, header, err := c.Request.FormFile("headerImg")
// 便于找到用户 以后从jwt中取
if err != nil {
response.FailWithMessage(fmt.Sprintf("上传文件失败,%v", err), c)
} else {
// 文件上传后拿到文件路径
err, filePath, _ := utils.Upload(header)
if err != nil {
response.FailWithMessage(fmt.Sprintf("接收返回值失败,%v", err), c)
} else {
// 修改数据库后得到修改后的user并且返回供前端使用
err, user := service.UploadHeaderImg(uuid, filePath)
if err != nil {
response.FailWithMessage(fmt.Sprintf("修改数据库链接失败,%v", err), c)
} else {
response.OkWithData(resp.SysUserResponse{User: *user}, c)
}
}
}
}
// @Tags SysUser
// @Summary 分页获取用户列表
// @Security ApiKeyAuth
@@ -290,3 +254,24 @@ func DeleteUser(c *gin.Context) {
response.OkWithMessage("删除成功", c)
}
}
// @Tags SysUser
// @Summary 删除用户
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.SysUser true "删除用户"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"修改成功"}"
// @Router /user/setUserInfo [put]
func SetUserInfo(c *gin.Context) {
var user model.SysUser
c.ShouldBindJSON(&user)
err, ReqUser := service.SetUserInfo(user)
if err != nil {
response.FailWithMessage(fmt.Sprintf("更新失败,%v", err), c)
} else {
response.OkWithData(gin.H{
"userInfo": ReqUser,
}, c)
}
}
+82 -34
View File
@@ -2,60 +2,108 @@
# casbin configuration
casbin:
model-path: './resource/rbac_model.conf'
model-path: './resource/rbac_model.conf'
# jwt configuration
jwt:
signing-key: 'qmPlus'
signing-key: 'qmPlus'
# mysql connect configuration
mysql:
username: root
password: 'Aa@6447985'
path: '127.0.0.1:3306'
db-name: 'qmPlus'
config: 'charset=utf8&parseTime=True&loc=Local'
max-idle-conns: 10
max-open-conns: 10
log-mode: false
username: root
password: 'Aa@6447985'
path: '127.0.0.1:3306'
db-name: 'qmPlus'
config: 'charset=utf8mb4&parseTime=True&loc=Local'
max-idle-conns: 10
max-open-conns: 10
log-mode: false
#sqlite 配置
# Postgresql connect configuration
postgresql:
username: 'gorm'
password: 'gorm'
db-name: 'gorm'
port: '9920'
config: 'sslmode=disable TimeZone=Asia/Shanghai'
max-idle-conns: 10
max-open-conns: 10
logger: false
prefer-simple-protocol: true
# sqlite connect configuration
# sqlite需要gcc支持 windows用户需要自行安装gcc
sqlite:
path: db.db
log-mode: true
config: 'loc=Asia/Shanghai'
# path: 'file::memory:?cache=shared' # 内存模式
path: 'db.db'
max-idle-conns: 10
max-open-conns: 10
logger: true
# Sqlserver connect configuration
sqlserver:
username: 'gorm'
password: 'LoremIpsum86'
db-name: 'gorm'
path: 'localhost:9930'
max-idle-conns: 10
max-open-conns: 10
logger: true
# oss configuration
# 切换本地与七牛云上传,分配头像和文件路径
localupload:
local: false
file-path: uploads/file
# 请自行七牛申请对应的 公钥 私钥 bucket 和 域名地址
qiniu:
access-key: '25j8dYBZ2wuiy0yhwShytjZDTX662b8xiFguwxzZ'
secret-key: 'pgdbqEsf7ooZh7W3xokP833h3dZ_VecFXPDeG5JY'
bucket: 'qm-plus-img'
img-path: 'http://qmplusimg.henrongyi.top'
access-key: '25j8dYBZ2wuiy0yhwShytjZDTX662b8xiFguwxzZ'
secret-key: 'pgdbqEsf7ooZh7W3xokP833h3dZ_VecFXPDeG5JY'
bucket: 'qm-plus-img'
img-path: 'http://qmplusimg.henrongyi.top'
# redis configuration
redis:
addr: '127.0.0.1:6379'
password: ''
db: 0
addr: '127.0.0.1:6379'
password: ''
db: 0
# system configuration
system:
use-multipoint: false
env: 'public' # Change to "develop" to skip authentication for development mode
addr: 8888
db-type: "mysql" # support mysql/sqlite
use-multipoint: false
env: 'public' # Change to "develop" to skip authentication for development mode
addr: 8888
db-type: "mysql" # support mysql/postgresql/sqlite/sqlserver
need-init-data: false
# captcha configuration
captcha:
key-long: 6
img-width: 240
img-height: 80
key-long: 6
img-width: 240
img-height: 80
# logger configuration
log:
prefix: '[GIN-VUE-ADMIN]'
log-file: true
stdout: 'DEBUG'
file: 'DEBUG'
# zap logger configuration
zap:
# 可使用 "debug", "info", "warn", "error", "dpanic", "panic", "fatal",
level: 'info'
# console: 控制台, json: json格式输出
format: 'console'
prefix: '[GIN-VUE-ADMIN]'
director: 'log'
link-name: 'latest_log'
show-line: true
# LowercaseLevelEncoder:小写, LowercaseColorLevelEncoder:小写带颜色,CapitalLevelEncoder: 大写, CapitalColorLevelEncoder: 大写带颜色,
encode-level: 'LowercaseColorLevelEncoder'
stacktrace-key: 'stacktrace'
log-in-console: true
email:
email-from: 'xxx@163.com'
email-nickname: 'test'
email-secret: 'xxx'
email-to: 'xxx@qq.com'
email-host: 'smtp.163.com'
email-port: 465
email-isSSL: true
+67 -20
View File
@@ -1,15 +1,19 @@
package config
type Server struct {
Mysql Mysql `mapstructure:"mysql" json:"mysql" yaml:"mysql"`
Sqlite Sqlite `mapstructure:"sqlite" json:"sqlite" yaml:"sqlite"`
Qiniu Qiniu `mapstructure:"qiniu" json:"qiniu" yaml:"qiniu"`
Casbin Casbin `mapstructure:"casbin" json:"casbin" yaml:"casbin"`
Redis Redis `mapstructure:"redis" json:"redis" yaml:"redis"`
System System `mapstructure:"system" json:"system" yaml:"system"`
JWT JWT `mapstructure:"jwt" json:"jwt" yaml:"jwt"`
Captcha Captcha `mapstructure:"captcha" json:"captcha" yaml:"captcha"`
Log Log `mapstructure:"log" json:"log" yaml:"log"`
Mysql Mysql `mapstructure:"mysql" json:"mysql" yaml:"mysql"`
Postgresql Postgresql `mapstructure:"postgresql" json:"postgresql" yaml:"postgresql"`
Sqlite Sqlite `mapstructure:"sqlite" json:"sqlite" yaml:"sqlite"`
Sqlserver Sqlserver `mapstructure:"sqlserver" json:"sqlserver" yaml:"sqlserver"`
Qiniu Qiniu `mapstructure:"qiniu" json:"qiniu" yaml:"qiniu"`
Casbin Casbin `mapstructure:"casbin" json:"casbin" yaml:"casbin"`
Redis Redis `mapstructure:"redis" json:"redis" yaml:"redis"`
System System `mapstructure:"system" json:"system" yaml:"system"`
JWT JWT `mapstructure:"jwt" json:"jwt" yaml:"jwt"`
Captcha Captcha `mapstructure:"captcha" json:"captcha" yaml:"captcha"`
Zap Zap `mapstructure:"zap" json:"zap" yaml:"zap"`
LocalUpload LocalUpload `mapstructure:"localUpload" json:"localUpload" yaml:"localUpload"`
Email Email `mapstructure:"email" json:"email" yaml:"email"`
}
type System struct {
@@ -17,6 +21,7 @@ type System struct {
Env string `mapstructure:"env" json:"env" yaml:"env"`
Addr int `mapstructure:"addr" json:"addr" yaml:"addr"`
DbType string `mapstructure:"db-type" json:"dbType" yaml:"db-type"`
NeedInitData bool `mapstructure:"need-init-data" json:"needInitData" yaml:"need-init-data"`
}
type JWT struct {
@@ -38,11 +43,46 @@ type Mysql struct {
LogMode bool `mapstructure:"log-mode" json:"logMode" yaml:"log-mode"`
}
type Postgresql struct {
Username string `mapstructure:"username" json:"username" yaml:"username"`
Password string `mapstructure:"password" json:"password" yaml:"password"`
Dbname string `mapstructure:"db-name" json:"dbname" yaml:"db-name"`
Port string `mapstructure:"port" json:"port" yaml:"port"`
Config string `mapstructure:"config" json:"config" yaml:"config"`
MaxIdleConns int `mapstructure:"max-idle-conns" json:"maxIdleConns" yaml:"max-idle-conns"`
MaxOpenConns int `mapstructure:"max-open-conns" json:"maxOpenConns" yaml:"max-open-conns"`
Logger bool `mapstructure:"logger" json:"logger" yaml:"logger"`
PreferSimpleProtocol bool `mapstructure:"prefer-simple-protocol" json:"preferSimpleProtocol" yaml:"prefer-simple-protocol"`
}
type Sqlite struct {
Path string `mapstructure:"path" json:"path" yaml:"path"`
MaxIdleConns int `mapstructure:"max-idle-conns" json:"maxIdleConns" yaml:"max-idle-conns"`
MaxOpenConns int `mapstructure:"max-open-conns" json:"maxOpenConns" yaml:"max-open-conns"`
Logger bool `mapstructure:"logger" json:"logger" yaml:"logger"`
}
type Sqlserver struct {
Username string `mapstructure:"username" json:"username" yaml:"username"`
Password string `mapstructure:"password" json:"password" yaml:"password"`
Path string `mapstructure:"path" json:"path" yaml:"path"`
Dbname string `mapstructure:"db-name" json:"dbname" yaml:"db-name"`
MaxIdleConns int `mapstructure:"max-idle-conns" json:"maxIdleConns" yaml:"max-idle-conns"`
MaxOpenConns int `mapstructure:"max-open-conns" json:"maxOpenConns" yaml:"max-open-conns"`
Logger bool `mapstructure:"logger" json:"logger" yaml:"logger"`
}
type Redis struct {
Addr string `mapstructure:"addr" json:"addr" yaml:"addr"`
Password string `mapstructure:"password" json:"password" yaml:"password"`
DB int `mapstructure:"db" json:"db" yaml:"db"`
}
type LocalUpload struct {
Local bool `mapstructure:"local" json:"local" yaml:"local"`
FilePath string `mapstructure:"file-path" json:"filePath" yaml:"file-path"`
}
type Qiniu struct {
AccessKey string `mapstructure:"access-key" json:"accessKey" yaml:"access-key"`
SecretKey string `mapstructure:"secret-key" json:"secretKey" yaml:"secret-key"`
@@ -56,17 +96,24 @@ type Captcha struct {
ImgHeight int `mapstructure:"img-height" json:"imgHeight" yaml:"img-height"`
}
type Log struct {
Prefix string `mapstructure:"prefix" json:"prefix" yaml:"prefix"`
LogFile bool `mapstructure:"log-file" json:"logFile" yaml:"log-file"`
Stdout string `mapstructure:"stdout" json:"stdout" yaml:"stdout"`
File string `mapstructure:"file" json:"file" yaml:"file"`
type Zap struct {
Level string `mapstructure:"level" json:"level" yaml:"level"`
Format string `mapstructure:"format" json:"format" yaml:"format"`
Prefix string `mapstructure:"prefix" json:"prefix" yaml:"prefix"`
Director string `mapstructure:"director" json:"director" yaml:"director"`
LinkName string `mapstructure:"link-name" json:"linkName" yaml:"link-name"`
ShowLine bool `mapstructure:"show-line" json:"showLine" yaml:"showLine"`
EncodeLevel string `mapstructure:"encode-level" json:"encodeLevel" yaml:"encode-level"`
StacktraceKey string `mapstructure:"stacktrace-key" json:"stacktraceKey" yaml:"stacktrace-key"`
LogInConsole bool `mapstructure:"log-in-console" json:"logInConsole" yaml:"log-in-console"`
}
type Sqlite struct {
Username string `mapstructure:"username" json:"username" yaml:"username"`
Password string `mapstructure:"password" json:"password" yaml:"password"`
Path string `mapstructure:"path" json:"path" yaml:"path"`
Config string `mapstructure:"config" json:"config" yaml:"config"`
LogMode bool `mapstructure:"log-mode" json:"logMode" yaml:"log-mode"`
type Email struct {
EmailFrom string `mapstructure:"email-from" json:"emailFrom" yaml:"email-from"`
EmailNickname string `mapstructure:"email-nickname" json:"emailNickname" yaml:"email-nickname"`
EmailSecret string `mapstructure:"email-secret" json:"emailSecret" yaml:"email-secret"`
EmailTo string `mapstructure:"email-to" json:"emailTo" yaml:"email-to"`
EmailHost string `mapstructure:"email-host" json:"emailHost" yaml:"email-host"`
EmailPort int `mapstructure:"email-port" json:"emailPort" yaml:"email-port"`
EmailIsSSL bool `mapstructure:"email-is-ssl" json:"emailIsSSL" yaml:"email-is-ssl"`
}
+15 -1
View File
@@ -6,13 +6,27 @@ import (
_ "gin-vue-admin/packfile"
"github.com/fsnotify/fsnotify"
"github.com/spf13/viper"
"github.com/spf13/pflag"
)
const defaultConfigFile = "config.yaml"
func init() {
pflag.StringP("configFile","c", "", "choose config file.")
pflag.Parse()
// 优先级: 命令行 > 环境变量 > 默认值
v := viper.New()
v.SetConfigFile(defaultConfigFile)
v.BindPFlags(pflag.CommandLine)
v.SetEnvPrefix("gva")
v.BindEnv("configFile") // GVA_CONFIGFILE
configFile := v.GetString("configFile")
if configFile == ""{
configFile = defaultConfigFile
}
v.SetConfigFile(configFile)
err := v.ReadInConfig()
if err != nil {
panic(fmt.Errorf("Fatal error config file: %s \n", err))
-26
View File
@@ -1,26 +0,0 @@
package core
import (
"fmt"
"gin-vue-admin/global"
"gin-vue-admin/initialize"
"gin-vue-admin/middleware"
"github.com/gin-gonic/gin"
"github.com/piexlmax/gvaplug"
)
func InstallPlugs(route *gin.Engine) {
GvaPlugsGroupBase := route.Group("") // 纯净路由 插件可通用 传递给插件的0号位置 为了不让插件的自动路由出问题 这里建议为 ""
/**安装一个插件需要的步骤 start**/
GvaPlugsGroupMiddle := route.Group("") // 携带中间件的路由 传递给插件的1号位置 为了不让插件的自动路由出问题 这里建议为 ""
GvaPlugsGroupMiddle.Use(middleware.JWTAuth()).Use(middleware.CasbinHandler())
// 插件安装 暂时只是后台功能 添加model 添加路由 添加对数据库的操作 详细插件测试模板可看https://github.com/piexlmax/gvaplug 此处不建议投入生产
err := initialize.InstallPlug(global.GVA_DB, [2]*gin.RouterGroup{
GvaPlugsGroupBase,
GvaPlugsGroupMiddle,
}, gvaplug.GvaPlug{SomeConfig: "插件给用户提供的配置区域"})
if err != nil {
panic(fmt.Sprintf("插件安装失败: %v", err))
}
/**安装一个插件需要的步骤 end**/
}
-107
View File
@@ -1,107 +0,0 @@
package core
import (
"fmt"
"gin-vue-admin/config"
"gin-vue-admin/global"
"gin-vue-admin/utils"
"github.com/gin-gonic/gin"
rotatelogs "github.com/lestrrat/go-file-rotatelogs"
oplogging "github.com/op/go-logging"
"io"
"os"
"strings"
"time"
)
const (
logDir = "log"
logSoftLink = "latest_log"
module = "gin-vue-admin"
)
var (
defaultFormatter = `%{time:2006/01/02 - 15:04:05.000} %{longfile} %{color:bold}▶ [%{level:.6s}] %{message}%{color:reset}`
)
func init() {
c := global.GVA_CONFIG.Log
if c.Prefix == "" {
_ = fmt.Errorf("logger prefix not found")
}
logger := oplogging.MustGetLogger(module)
var backends []oplogging.Backend
registerStdout(c, &backends)
if fileWriter := registerFile(c, &backends); fileWriter != nil {
gin.DefaultWriter = io.MultiWriter(fileWriter, os.Stdout)
}
oplogging.SetBackend(backends...)
global.GVA_LOG = logger
}
func registerStdout(c config.Log, backends *[]oplogging.Backend) {
if c.Stdout != "" {
level, err := oplogging.LogLevel(c.Stdout)
if err != nil {
fmt.Println(err)
}
*backends = append(*backends, createBackend(os.Stdout, c, level))
}
}
func registerFile(c config.Log, backends *[]oplogging.Backend) io.Writer {
if c.File != "" {
if ok, _ := utils.PathExists(logDir); !ok {
// directory not exist
fmt.Println("create log directory")
_ = os.Mkdir(logDir, os.ModePerm)
}
fileWriter, err := rotatelogs.New(
logDir+string(os.PathSeparator)+"%Y-%m-%d-%H-%M.log",
// generate soft link, point to latest log file
rotatelogs.WithLinkName(logSoftLink),
// maximum time to save log files
rotatelogs.WithMaxAge(7*24*time.Hour),
// time period of log file switching
rotatelogs.WithRotationTime(24*time.Hour),
)
if err != nil {
fmt.Println(err)
}
level, err := oplogging.LogLevel(c.File)
if err != nil {
fmt.Println(err)
}
*backends = append(*backends, createBackend(fileWriter, c, level))
return fileWriter
}
return nil
}
func createBackend(w io.Writer, c config.Log, level oplogging.Level) oplogging.Backend {
backend := oplogging.NewLogBackend(w, c.Prefix, 0)
stdoutWriter := false
if w == os.Stdout {
stdoutWriter = true
}
format := getLogFormatter(c, stdoutWriter)
backendLeveled := oplogging.AddModuleLevel(oplogging.NewBackendFormatter(backend, format))
backendLeveled.SetLevel(level, module)
return backendLeveled
}
func getLogFormatter(c config.Log, stdoutWriter bool) oplogging.Formatter {
pattern := defaultFormatter
if !stdoutWriter {
// Color is only required for console output
// Other writers don't need %{color} tag
pattern = strings.Replace(pattern, "%{color:bold}", "", -1)
pattern = strings.Replace(pattern, "%{color:reset}", "", -1)
}
if !c.LogFile {
// Remove %{logfile} tag
pattern = strings.Replace(pattern, "%{longfile}", "", -1)
}
return oplogging.MustStringFormatter(pattern)
}
+4 -6
View File
@@ -4,6 +4,7 @@ import (
"fmt"
"gin-vue-admin/global"
"gin-vue-admin/initialize"
"go.uber.org/zap"
"time"
)
@@ -19,19 +20,16 @@ func RunWindowsServer() {
Router := initialize.Routers()
Router.Static("/form-generator", "./resource/page")
//InstallPlugs(Router)
// end 插件描述
address := fmt.Sprintf(":%d", global.GVA_CONFIG.System.Addr)
s := initServer(address, Router)
// 保证文本顺序输出
// In order to ensure that the text order output can be deleted
time.Sleep(10 * time.Microsecond)
global.GVA_LOG.Debug("server run success on ", address)
global.GVA_LOG.Info("server run success on ", zap.String("address", address))
fmt.Printf(`欢迎使用 Gin-Vue-Admin
默认自动化文档地址:http://127.0.0.1%s/swagger/index.html
默认前端文件运行地址:http://127.0.0.1:8080
默认前端文件运行地址:http://127.0.0.1:8000
`, address)
global.GVA_LOG.Error(s.ListenAndServe())
global.GVA_LOG.Error(s.ListenAndServe().Error())
}
+119
View File
@@ -0,0 +1,119 @@
package core
import (
"fmt"
"gin-vue-admin/global"
"gin-vue-admin/utils"
zaprotatelogs "github.com/lestrrat-go/file-rotatelogs"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
"os"
"time"
)
var (
err error
level zapcore.Level
writer zapcore.WriteSyncer
)
func init() {
if ok, _ := utils.PathExists(global.GVA_CONFIG.Zap.Director); !ok { // 判断是否有Director文件夹
fmt.Printf("create %v directory\n", global.GVA_CONFIG.Zap.Director)
_ = os.Mkdir(global.GVA_CONFIG.Zap.Director, os.ModePerm)
}
switch global.GVA_CONFIG.Zap.Level { // 初始化配置文件的Level
case "debug":
level = zap.DebugLevel
case "info":
level = zap.InfoLevel
case "warn":
level = zap.WarnLevel
case "error":
level = zap.ErrorLevel
case "dpanic":
level = zap.DPanicLevel
case "panic":
level = zap.PanicLevel
case "fatal":
level = zap.FatalLevel
default:
level = zap.InfoLevel
}
writer, err = getWriteSyncer() // 使用file-rotatelogs进行日志分割
if err != nil {
fmt.Printf("Get Write Syncer Failed err:%v", err.Error())
return
}
if level == zap.DebugLevel || level == zap.ErrorLevel {
global.GVA_LOG = zap.New(getEncoderCore(), zap.AddStacktrace(level))
} else {
global.GVA_LOG = zap.New(getEncoderCore())
}
if global.GVA_CONFIG.Zap.ShowLine {
global.GVA_LOG.WithOptions(zap.AddCaller())
}
}
// getWriteSyncer zap logger中加入file-rotatelogs
func getWriteSyncer() (zapcore.WriteSyncer, error) {
fileWriter, err := zaprotatelogs.New(
global.GVA_CONFIG.Zap.Director+string(os.PathSeparator)+"%Y-%m-%d.log",
zaprotatelogs.WithLinkName(global.GVA_CONFIG.Zap.LinkName),
zaprotatelogs.WithMaxAge(7*24*time.Hour),
zaprotatelogs.WithRotationTime(24*time.Hour),
)
if global.GVA_CONFIG.Zap.LogInConsole {
return zapcore.NewMultiWriteSyncer(zapcore.AddSync(os.Stdout), zapcore.AddSync(fileWriter)), err
}
return zapcore.AddSync(fileWriter), err
}
// getEncoderConfig 获取zapcore.EncoderConfig
func getEncoderConfig() (config zapcore.EncoderConfig) {
config = zapcore.EncoderConfig{
MessageKey: "message",
LevelKey: "level",
TimeKey: "time",
NameKey: "logger",
CallerKey: "caller",
StacktraceKey: global.GVA_CONFIG.Zap.StacktraceKey,
LineEnding: zapcore.DefaultLineEnding,
EncodeLevel: zapcore.LowercaseLevelEncoder,
EncodeTime: CustomTimeEncoder,
EncodeDuration: zapcore.SecondsDurationEncoder,
EncodeCaller: zapcore.FullCallerEncoder,
}
switch {
case global.GVA_CONFIG.Zap.EncodeLevel == "LowercaseLevelEncoder": // 小写编码器(默认)
config.EncodeLevel = zapcore.LowercaseLevelEncoder
case global.GVA_CONFIG.Zap.EncodeLevel == "LowercaseColorLevelEncoder": // 小写编码器带颜色
config.EncodeLevel = zapcore.LowercaseColorLevelEncoder
case global.GVA_CONFIG.Zap.EncodeLevel == "CapitalLevelEncoder": // 大写编码器
config.EncodeLevel = zapcore.CapitalLevelEncoder
case global.GVA_CONFIG.Zap.EncodeLevel == "CapitalColorLevelEncoder": // 大写编码器带颜色
config.EncodeLevel = zapcore.CapitalColorLevelEncoder
}
return config
}
// getEncoder 获取zapcore.Encoder
func getEncoder() zapcore.Encoder {
if global.GVA_CONFIG.Zap.Format == "json" {
return zapcore.NewJSONEncoder(getEncoderConfig())
}
return zapcore.NewConsoleEncoder(getEncoderConfig())
}
// getEncoderCore 获取Encoder的zapcore.Core
func getEncoderCore() (core zapcore.Core) {
return zapcore.NewCore(getEncoder(), writer, level)
}
// 自定义日志输出时间格式
func CustomTimeEncoder(t time.Time, enc zapcore.PrimitiveArrayEncoder) {
enc.AppendString(t.Format(global.GVA_CONFIG.Zap.Prefix + "2006/01/02 - 15:04:05.000"))
}
BIN
View File
Binary file not shown.
-97
View File
@@ -1,97 +0,0 @@
INSERT INTO `sys_base_menus` VALUES (52, '2020-06-29 13:31:17', '2020-07-07 16:05:34', NULL, 0, 3, 'operation', 'operation', 0, 'view/superAdmin/operation/sysOperationRecord.vue', '操作历史', 'time', NULL, 6, 0, 0);
INSERT INTO `sys_dictionaries` VALUES (3, '2020-07-05 15:27:31', '2020-07-05 15:27:31', NULL, '数据库int类型', 'int', 1, 'int类型对应的数据库类型');
INSERT INTO `sys_dictionaries` VALUES (4, '2020-07-05 15:33:07', '2020-07-05 16:07:18', NULL, '数据库时间日期类型', 'time.Time', 1, '数据库时间日期类型');
INSERT INTO `sys_dictionaries` VALUES (5, '2020-07-05 15:34:23', '2020-07-05 15:52:45', NULL, '数据库浮点型', 'float64', 1, '数据库浮点型');
INSERT INTO `sys_dictionaries` VALUES (6, '2020-07-05 15:35:05', '2020-07-05 15:35:05', NULL, '数据库字符串', 'string', 1, '数据库字符串');
INSERT INTO `sys_dictionaries` VALUES (7, '2020-07-05 15:36:48', '2020-07-05 15:36:48', NULL, '数据库bool类型', 'bool', 1, '数据库bool类型');
INSERT INTO `sys_dictionary_details` VALUES (12, '2020-07-05 15:31:41', '2020-07-05 15:31:41', NULL, 'smallint', 1, 1, 1, 3);
INSERT INTO `sys_dictionary_details` VALUES (13, '2020-07-05 15:31:52', '2020-07-05 15:31:52', NULL, 'mediumint', 2, 1, 2, 3);
INSERT INTO `sys_dictionary_details` VALUES (14, '2020-07-05 15:32:04', '2020-07-05 15:32:04', NULL, 'int', 3, 1, 3, 3);
INSERT INTO `sys_dictionary_details` VALUES (15, '2020-07-05 15:32:11', '2020-07-05 15:32:11', NULL, 'bigint', 4, 1, 4, 3);
INSERT INTO `sys_dictionary_details` VALUES (19, '2020-07-05 15:33:16', '2020-07-05 15:33:16', NULL, 'data', 0, 1, 0, 4);
INSERT INTO `sys_dictionary_details` VALUES (20, '2020-07-05 15:33:21', '2020-07-05 15:33:21', NULL, 'time', 1, 1, 1, 4);
INSERT INTO `sys_dictionary_details` VALUES (21, '2020-07-05 15:33:25', '2020-07-05 15:33:25', NULL, 'year', 2, 1, 2, 4);
INSERT INTO `sys_dictionary_details` VALUES (22, '2020-07-05 15:33:35', '2020-07-05 15:33:35', NULL, 'datetime', 3, 1, 3, 4);
INSERT INTO `sys_dictionary_details` VALUES (23, '2020-07-05 15:33:42', '2020-07-05 15:33:42', NULL, 'timestamp', 5, 1, 5, 4);
INSERT INTO `sys_dictionary_details` VALUES (24, '2020-07-05 15:34:30', '2020-07-05 15:34:30', NULL, 'float', 0, 1, 0, 5);
INSERT INTO `sys_dictionary_details` VALUES (25, '2020-07-05 15:34:35', '2020-07-05 15:34:35', NULL, 'double', 1, 1, 1, 5);
INSERT INTO `sys_dictionary_details` VALUES (26, '2020-07-05 15:34:41', '2020-07-05 15:34:41', NULL, 'decimal', 2, 1, 2, 5);
INSERT INTO `sys_dictionary_details` VALUES (27, '2020-07-05 15:37:45', '2020-07-05 15:37:45', NULL, 'tinyint', 0, 1, 0, 7);
INSERT INTO `sys_dictionary_details` VALUES (28, '2020-07-05 15:53:25', '2020-07-05 15:53:25', NULL, 'char', 0, 1, 0, 6);
INSERT INTO `sys_dictionary_details` VALUES (29, '2020-07-05 15:53:29', '2020-07-05 15:53:29', NULL, 'varchar', 1, 1, 1, 6);
INSERT INTO `sys_dictionary_details` VALUES (30, '2020-07-05 15:53:35', '2020-07-05 15:53:35', NULL, 'tinyblob', 2, 1, 2, 6);
INSERT INTO `sys_dictionary_details` VALUES (31, '2020-07-05 15:53:40', '2020-07-05 15:53:40', NULL, 'tinytext', 3, 1, 3, 6);
INSERT INTO `sys_dictionary_details` VALUES (32, '2020-07-05 15:53:48', '2020-07-05 15:53:48', NULL, 'text', 4, 1, 4, 6);
INSERT INTO `sys_dictionary_details` VALUES (33, '2020-07-05 15:53:55', '2020-07-05 15:53:55', NULL, 'blob', 5, 1, 5, 6);
INSERT INTO `sys_dictionary_details` VALUES (34, '2020-07-05 15:54:02', '2020-07-05 15:54:02', NULL, 'mediumblob', 6, 1, 6, 6);
INSERT INTO `sys_dictionary_details` VALUES (35, '2020-07-05 15:54:09', '2020-07-05 15:54:09', NULL, 'mediumtext', 7, 1, 7, 6);
INSERT INTO `sys_dictionary_details` VALUES (36, '2020-07-05 15:54:16', '2020-07-05 15:54:16', NULL, 'longblob', 8, 1, 8, 6);
INSERT INTO `sys_dictionary_details` VALUES (37, '2020-07-05 15:54:24', '2020-07-05 15:54:24', NULL, 'longtext', 9, 1, 9, 6);
INSERT INTO `sys_apis` VALUES (91, '2020-06-29 13:21:35', '2020-06-29 13:21:35', NULL, NULL, '/sysOperationRecord/createSysOperationRecord', '新增操作记录', 'sysOperationRecord', 'POST');
INSERT INTO `sys_apis` VALUES (92, '2020-06-29 13:21:35', '2020-06-29 13:21:35', NULL, NULL, '/sysOperationRecord/deleteSysOperationRecord', '删除操作记录', 'sysOperationRecord', 'DELETE');
INSERT INTO `sys_apis` VALUES (93, '2020-06-29 13:21:35', '2020-06-29 13:21:35', NULL, NULL, '/sysOperationRecord/updateSysOperationRecord', '更新操作记录', 'sysOperationRecord', 'PUT');
INSERT INTO `sys_apis` VALUES (94, '2020-06-29 13:21:35', '2020-06-29 13:21:35', NULL, NULL, '/sysOperationRecord/findSysOperationRecord', '根据ID获取操作记录', 'sysOperationRecord', 'GET');
INSERT INTO `sys_apis` VALUES (95, '2020-06-29 13:21:35', '2020-06-29 13:21:35', NULL, NULL, '/sysOperationRecord/getSysOperationRecordList', '获取操作记录列表', 'sysOperationRecord', 'GET');
INSERT INTO `sys_apis` VALUES (96, '2020-07-05 14:34:20', '2020-07-05 14:34:20', NULL, NULL, '/autoCode/getTables', '获取数据库表', 'autoCode', 'GET');
INSERT INTO `sys_apis` VALUES (97, '2020-07-05 15:02:07', '2020-07-05 15:02:07', NULL, NULL, '/autoCode/getDB', '获取所有数据库', 'autoCode', 'GET');
INSERT INTO `sys_apis` VALUES (98, '2020-07-05 16:32:08', '2020-07-05 16:32:08', NULL, NULL, '/autoCode/getColume', '获取所选table的所有字段', 'autoCode', 'GET');
INSERT INTO `sys_apis` VALUES (99, '2020-07-07 15:59:53', '2020-07-07 15:59:53', NULL, NULL, '/sysOperationRecord/deleteSysOperationRecordByIds', '批量删除操作历史', 'sysOperationRecord', 'DELETE');
-- ----------------------------
-- Table structure for sys_operation_records
-- ----------------------------
DROP TABLE IF EXISTS `sys_operation_records`;
CREATE TABLE `sys_operation_records` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`created_at` datetime(0) NULL DEFAULT NULL,
`updated_at` datetime(0) NULL DEFAULT NULL,
`deleted_at` datetime(0) NULL DEFAULT NULL,
`ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '请求ip',
`method` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '请求方法',
`path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '请求路由',
`status` int(11) NULL DEFAULT NULL COMMENT '状态',
`latency` bigint(20) NULL DEFAULT NULL,
`agent` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
`error_message` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
`body` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL COMMENT '请求Body',
`user_id` int(11) NULL DEFAULT NULL COMMENT '用户id',
`resp` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL COMMENT '响应Body',
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_sys_operation_records_deleted_at`(`deleted_at`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 342 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Compact;
INSERT INTO `casbin_rule` VALUES ('p', '888', '/sysOperationRecord/createSysOperationRecord', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/sysOperationRecord/deleteSysOperationRecord', 'DELETE', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/sysOperationRecord/updateSysOperationRecord', 'PUT', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/sysOperationRecord/findSysOperationRecord', 'GET', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/sysOperationRecord/getSysOperationRecordList', 'GET', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/sysOperationRecord/deleteSysOperationRecordByIds', 'DELETE', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/autoCode/getTables', 'GET', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/autoCode/getDB', 'GET', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/autoCode/getColume', 'GET', '', '', '');
INSERT INTO `sys_authority_menus` VALUES ('888', 52);
-- 2020/07/08版本更新补丁
-- 增加了共自动化用的字典
-- 增加了操作记录 menu
-- 增加了操作记录相关api
-- 增加了操作记录表
-- 增加了角色和操作记录关联api
-- 增加了角色和menu关联记录
-27
View File
@@ -1,27 +0,0 @@
INSERT INTO `casbin_rule` VALUES ('p', '888', '/simpleUploader/upload', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/simpleUploader/checkFileMd5', 'GET', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/simpleUploader/mergeFileMd5', 'GET', '', '', '');
-- ----------------------------
-- Table structure for exa_simple_uploaders
-- ----------------------------
DROP TABLE IF EXISTS `exa_simple_uploaders`;
CREATE TABLE `exa_simple_uploaders` (
`chunk_number` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '当前切片标记',
`current_chunk_size` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '当前切片容量',
`current_chunk_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '切片本地路径',
`total_size` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '总容量',
`identifier` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '文件标识(md5)',
`filename` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '文件名',
`total_chunks` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '切片总数',
`is_done` tinyint(1) NULL DEFAULT NULL COMMENT '是否上传完成',
`file_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '文件本地路径'
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Compact;
INSERT INTO `sys_apis` VALUES (100, '2020-08-15 12:10:55', '2020-08-15 12:10:55', NULL, NULL, '/simpleUploader/upload', '插件版分片上传', 'simpleUploader', 'POST');
INSERT INTO `sys_apis` VALUES (101, '2020-08-15 19:53:53', '2020-08-15 19:53:53', NULL, NULL, '/simpleUploader/checkFileMd5', '文件完整度验证', 'simpleUploader', 'GET');
INSERT INTO `sys_apis` VALUES (102, '2020-08-15 22:28:04', '2020-08-15 22:28:04', NULL, NULL, '/simpleUploader/mergeFileMd5', '上传完成合并文件', 'simpleUploader', 'GET');
INSERT INTO `sys_authority_menus` VALUES ('888', 53);
INSERT INTO `sys_base_menus` VALUES (53, '2020-08-15 11:41:49', '2020-08-15 11:43:15', NULL, 0, 19, 'simpleUploader', 'simpleUploader', 0, 'view/example/simpleUploader/simpleUploader', '断点续传(插件版)', 'upload', NULL, 6, 0, 0);
-734
View File
@@ -1,734 +0,0 @@
/*
Navicat Premium Data Transfer
Source Server : pandora
Source Server Type : MySQL
Source Server Version : 50640
Source Host : localhost:3306
Source Schema : qmplus
Target Server Type : MySQL
Target Server Version : 50640
File Encoding : 65001
Date: 15/08/2020 23:09:13
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for casbin_rule
-- ----------------------------
DROP TABLE IF EXISTS `casbin_rule`;
CREATE TABLE `casbin_rule` (
`p_type` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`v0` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`v1` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`v2` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`v3` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`v4` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`v5` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Records of casbin_rule
-- ----------------------------
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/base/login', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/base/register', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/api/createApi', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/api/getApiList', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/api/getApiById', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/api/deleteApi', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/api/updateApi', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/api/getAllApis', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/authority/createAuthority', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/authority/deleteAuthority', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/authority/getAuthorityList', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/authority/setDataAuthority', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/menu/getMenu', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/menu/getMenuList', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/menu/addBaseMenu', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/menu/getBaseMenuTree', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/menu/addMenuAuthority', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/menu/getMenuAuthority', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/menu/deleteBaseMenu', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/menu/updateBaseMenu', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/menu/getBaseMenuById', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/user/changePassword', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/user/uploadHeaderImg', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/user/getInfoList', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/user/getUserList', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/user/setUserAuthority', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/fileUploadAndDownload/upload', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/fileUploadAndDownload/getFileList', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/fileUploadAndDownload/deleteFile', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/casbin/updateCasbin', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/casbin/getPolicyPathByAuthorityId', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/jwt/jsonInBlacklist', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/system/getSystemConfig', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/system/setSystemConfig', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/customer/customer', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/customer/customer', 'PUT', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/customer/customer', 'DELETE', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/customer/customer', 'GET', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '8881', '/customer/customerList', 'GET', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/base/login', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/base/register', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/api/createApi', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/api/getApiList', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/api/getApiById', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/api/deleteApi', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/api/updateApi', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/api/getAllApis', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/authority/createAuthority', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/authority/deleteAuthority', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/authority/getAuthorityList', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/authority/setDataAuthority', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/menu/getMenu', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/menu/getMenuList', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/menu/addBaseMenu', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/menu/getBaseMenuTree', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/menu/addMenuAuthority', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/menu/getMenuAuthority', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/menu/deleteBaseMenu', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/menu/updateBaseMenu', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/menu/getBaseMenuById', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/user/changePassword', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/user/uploadHeaderImg', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/user/getInfoList', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/user/getUserList', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/user/setUserAuthority', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/fileUploadAndDownload/upload', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/fileUploadAndDownload/getFileList', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/fileUploadAndDownload/deleteFile', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/casbin/updateCasbin', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/casbin/getPolicyPathByAuthorityId', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/jwt/jsonInBlacklist', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/system/getSystemConfig', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/system/setSystemConfig', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/customer/customer', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/customer/customer', 'PUT', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/customer/customer', 'DELETE', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/customer/customer', 'GET', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/customer/customerList', 'GET', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '9528', '/autoCode/createTemp', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/base/login', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/base/register', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/api/createApi', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/api/getApiList', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/api/getApiById', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/api/deleteApi', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/api/updateApi', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/api/getAllApis', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/authority/createAuthority', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/authority/deleteAuthority', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/authority/getAuthorityList', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/authority/setDataAuthority', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/authority/updateAuthority', 'PUT', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/authority/copyAuthority', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/menu/getMenu', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/menu/getMenuList', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/menu/addBaseMenu', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/menu/getBaseMenuTree', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/menu/addMenuAuthority', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/menu/getMenuAuthority', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/menu/deleteBaseMenu', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/menu/updateBaseMenu', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/menu/getBaseMenuById', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/user/changePassword', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/user/uploadHeaderImg', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/user/getInfoList', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/user/getUserList', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/user/setUserAuthority', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/user/deleteUser', 'DELETE', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/fileUploadAndDownload/upload', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/fileUploadAndDownload/getFileList', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/fileUploadAndDownload/deleteFile', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/casbin/updateCasbin', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/casbin/getPolicyPathByAuthorityId', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/casbin/casbinTest/:pathParam', 'GET', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/jwt/jsonInBlacklist', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/system/getSystemConfig', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/system/setSystemConfig', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/customer/customer', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/customer/customer', 'PUT', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/customer/customer', 'DELETE', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/customer/customer', 'GET', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/customer/customerList', 'GET', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/autoCode/createTemp', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/autoCode/getTables', 'GET', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/autoCode/getDB', 'GET', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/autoCode/getColume', 'GET', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/sysDictionaryDetail/createSysDictionaryDetail', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/sysDictionaryDetail/deleteSysDictionaryDetail', 'DELETE', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/sysDictionaryDetail/updateSysDictionaryDetail', 'PUT', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/sysDictionaryDetail/findSysDictionaryDetail', 'GET', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/sysDictionaryDetail/getSysDictionaryDetailList', 'GET', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/sysDictionary/createSysDictionary', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/sysDictionary/deleteSysDictionary', 'DELETE', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/sysDictionary/updateSysDictionary', 'PUT', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/sysDictionary/findSysDictionary', 'GET', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/sysDictionary/getSysDictionaryList', 'GET', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/sysOperationRecord/createSysOperationRecord', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/sysOperationRecord/deleteSysOperationRecord', 'DELETE', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/sysOperationRecord/updateSysOperationRecord', 'PUT', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/sysOperationRecord/findSysOperationRecord', 'GET', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/sysOperationRecord/getSysOperationRecordList', 'GET', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/sysOperationRecord/deleteSysOperationRecordByIds', 'DELETE', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/simpleUploader/upload', 'POST', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/simpleUploader/checkFileMd5', 'GET', '', '', '');
INSERT INTO `casbin_rule` VALUES ('p', '888', '/simpleUploader/mergeFileMd5', 'GET', '', '', '');
-- ----------------------------
-- Table structure for exa_customers
-- ----------------------------
DROP TABLE IF EXISTS `exa_customers`;
CREATE TABLE `exa_customers` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`created_at` timestamp(0) NULL DEFAULT NULL,
`updated_at` timestamp(0) NULL DEFAULT NULL,
`deleted_at` timestamp(0) NULL DEFAULT NULL,
`customer_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '客户名',
`customer_phone_data` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '客户电话',
`sys_user_id` int(10) UNSIGNED NULL DEFAULT NULL COMMENT '负责员工id',
`sys_user_authority_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '负责员工角色',
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_exa_customers_deleted_at`(`deleted_at`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Compact;
-- ----------------------------
-- Records of exa_customers
-- ----------------------------
INSERT INTO `exa_customers` VALUES (1, '2020-02-25 18:01:48', '2020-04-10 12:29:29', NULL, '测试客户', '1761111111', 10, '888');
-- ----------------------------
-- Table structure for exa_file_chunks
-- ----------------------------
DROP TABLE IF EXISTS `exa_file_chunks`;
CREATE TABLE `exa_file_chunks` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`created_at` timestamp(0) NULL DEFAULT NULL,
`updated_at` timestamp(0) NULL DEFAULT NULL,
`deleted_at` timestamp(0) NULL DEFAULT NULL,
`exa_file_id` int(10) UNSIGNED NULL DEFAULT NULL COMMENT '文件id',
`file_chunk_path` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '切片路径',
`file_chunk_number` int(11) NULL DEFAULT NULL COMMENT '切片标号',
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_exa_file_chunks_deleted_at`(`deleted_at`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for exa_file_upload_and_downloads
-- ----------------------------
DROP TABLE IF EXISTS `exa_file_upload_and_downloads`;
CREATE TABLE `exa_file_upload_and_downloads` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`created_at` timestamp(0) NULL DEFAULT NULL,
`updated_at` timestamp(0) NULL DEFAULT NULL,
`deleted_at` timestamp(0) NULL DEFAULT NULL,
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文件名',
`url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文件URL',
`tag` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文件类型',
`key` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '标记',
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_file_upload_and_downloads_deleted_at`(`deleted_at`) USING BTREE,
INDEX `idx_exa_file_upload_and_downloads_deleted_at`(`deleted_at`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 20 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Records of exa_file_upload_and_downloads
-- ----------------------------
INSERT INTO `exa_file_upload_and_downloads` VALUES (17, '2020-04-26 11:51:39', '2020-04-26 11:51:39', NULL, '10.png', 'http://qmplusimg.henrongyi.top/158787308910.png', 'png', '158787308910.png');
INSERT INTO `exa_file_upload_and_downloads` VALUES (19, '2020-04-27 15:48:38', '2020-04-27 15:48:38', NULL, 'logo.png', 'http://qmplusimg.henrongyi.top/1587973709logo.png', 'png', '1587973709logo.png');
-- ----------------------------
-- Table structure for exa_files
-- ----------------------------
DROP TABLE IF EXISTS `exa_files`;
CREATE TABLE `exa_files` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`created_at` timestamp(0) NULL DEFAULT NULL,
`updated_at` timestamp(0) NULL DEFAULT NULL,
`deleted_at` timestamp(0) NULL DEFAULT NULL,
`file_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文件名',
`file_md5` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文件md5',
`file_path` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文件路径',
`chunk_total` int(11) NULL DEFAULT NULL COMMENT '切片总数',
`is_finish` tinyint(1) NULL DEFAULT NULL COMMENT '是否完整',
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_exa_files_deleted_at`(`deleted_at`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for exa_simple_uploaders
-- ----------------------------
DROP TABLE IF EXISTS `exa_simple_uploaders`;
CREATE TABLE `exa_simple_uploaders` (
`chunk_number` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '当前切片标记',
`current_chunk_size` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '当前切片容量',
`current_chunk_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '切片本地路径',
`total_size` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '总容量',
`identifier` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '文件标识(md5)',
`filename` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '文件名',
`total_chunks` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '切片总数',
`is_done` tinyint(1) NULL DEFAULT NULL COMMENT '是否上传完成',
`file_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '文件本地路径'
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for jwt_blacklists
-- ----------------------------
DROP TABLE IF EXISTS `jwt_blacklists`;
CREATE TABLE `jwt_blacklists` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`created_at` timestamp(0) NULL DEFAULT NULL,
`updated_at` timestamp(0) NULL DEFAULT NULL,
`deleted_at` timestamp(0) NULL DEFAULT NULL,
`jwt` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT 'jwt',
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_jwt_blacklists_deleted_at`(`deleted_at`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for sys_apis
-- ----------------------------
DROP TABLE IF EXISTS `sys_apis`;
CREATE TABLE `sys_apis` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`created_at` timestamp(0) NULL DEFAULT NULL,
`updated_at` timestamp(0) NULL DEFAULT NULL,
`deleted_at` timestamp(0) NULL DEFAULT NULL,
`authority_id` int(10) UNSIGNED NULL DEFAULT NULL COMMENT '角色id',
`path` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '路由path',
`description` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '路由描述',
`api_group` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '路由分组',
`method` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'POST' COMMENT '请求方法',
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_apis_deleted_at`(`deleted_at`) USING BTREE,
INDEX `idx_sys_apis_deleted_at`(`deleted_at`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 103 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Records of sys_apis
-- ----------------------------
INSERT INTO `sys_apis` VALUES (1, '2019-09-28 11:23:49', '2019-09-28 17:06:16', NULL, NULL, '/base/login', '用户登录', 'base', 'POST');
INSERT INTO `sys_apis` VALUES (2, '2019-09-28 11:32:46', '2019-09-28 17:06:11', NULL, NULL, '/base/register', '用户注册', 'base', 'POST');
INSERT INTO `sys_apis` VALUES (3, '2019-09-28 11:33:41', '2020-05-10 16:33:48', NULL, NULL, '/api/createApi', '创建api', 'api', 'POST');
INSERT INTO `sys_apis` VALUES (4, '2019-09-28 14:09:04', '2019-09-28 17:05:59', NULL, NULL, '/api/getApiList', '获取api列表', 'api', 'POST');
INSERT INTO `sys_apis` VALUES (5, '2019-09-28 14:15:50', '2019-09-28 17:05:53', NULL, NULL, '/api/getApiById', '获取api详细信息', 'api', 'POST');
INSERT INTO `sys_apis` VALUES (7, '2019-09-28 14:19:26', '2019-09-28 17:05:44', NULL, NULL, '/api/deleteApi', '删除Api', 'api', 'POST');
INSERT INTO `sys_apis` VALUES (8, '2019-09-28 14:19:48', '2019-09-28 17:05:39', NULL, NULL, '/api/updateApi', '更新Api', 'api', 'POST');
INSERT INTO `sys_apis` VALUES (10, '2019-09-30 15:05:38', '2019-09-30 15:05:38', NULL, NULL, '/api/getAllApis', '获取所有api', 'api', 'POST');
INSERT INTO `sys_apis` VALUES (11, '2019-09-30 15:23:09', '2019-09-30 15:23:09', NULL, NULL, '/authority/createAuthority', '创建角色', 'authority', 'POST');
INSERT INTO `sys_apis` VALUES (12, '2019-09-30 15:23:33', '2019-09-30 15:23:33', NULL, NULL, '/authority/deleteAuthority', '删除角色', 'authority', 'POST');
INSERT INTO `sys_apis` VALUES (13, '2019-09-30 15:23:57', '2019-09-30 15:23:57', NULL, NULL, '/authority/getAuthorityList', '获取角色列表', 'authority', 'POST');
INSERT INTO `sys_apis` VALUES (14, '2019-09-30 15:24:20', '2019-09-30 15:24:20', NULL, NULL, '/menu/getMenu', '获取菜单树', 'menu', 'POST');
INSERT INTO `sys_apis` VALUES (15, '2019-09-30 15:24:50', '2019-09-30 15:24:50', NULL, NULL, '/menu/getMenuList', '分页获取基础menu列表', 'menu', 'POST');
INSERT INTO `sys_apis` VALUES (16, '2019-09-30 15:25:07', '2019-09-30 15:25:07', NULL, NULL, '/menu/addBaseMenu', '新增菜单', 'menu', 'POST');
INSERT INTO `sys_apis` VALUES (17, '2019-09-30 15:25:25', '2019-09-30 15:25:25', NULL, NULL, '/menu/getBaseMenuTree', '获取用户动态路由', 'menu', 'POST');
INSERT INTO `sys_apis` VALUES (18, '2019-09-30 15:25:53', '2019-09-30 15:25:53', NULL, NULL, '/menu/addMenuAuthority', '增加menu和角色关联关系', 'menu', 'POST');
INSERT INTO `sys_apis` VALUES (19, '2019-09-30 15:26:20', '2019-09-30 15:26:20', NULL, NULL, '/menu/getMenuAuthority', '获取指定角色menu', 'menu', 'POST');
INSERT INTO `sys_apis` VALUES (20, '2019-09-30 15:26:43', '2019-09-30 15:26:43', NULL, NULL, '/menu/deleteBaseMenu', '删除菜单', 'menu', 'POST');
INSERT INTO `sys_apis` VALUES (21, '2019-09-30 15:28:05', '2019-09-30 15:28:05', NULL, NULL, '/menu/updateBaseMenu', '更新菜单', 'menu', 'POST');
INSERT INTO `sys_apis` VALUES (22, '2019-09-30 15:28:21', '2019-09-30 15:28:21', NULL, NULL, '/menu/getBaseMenuById', '根据id获取菜单', 'menu', 'POST');
INSERT INTO `sys_apis` VALUES (23, '2019-09-30 15:29:19', '2019-09-30 15:29:19', NULL, NULL, '/user/changePassword', '修改密码', 'user', 'POST');
INSERT INTO `sys_apis` VALUES (24, '2019-09-30 15:29:33', '2019-09-30 15:29:33', NULL, NULL, '/user/uploadHeaderImg', '上传头像', 'user', 'POST');
INSERT INTO `sys_apis` VALUES (25, '2019-09-30 15:30:00', '2019-09-30 15:30:00', NULL, NULL, '/user/getInfoList', '分页获取用户列表', 'user', 'POST');
INSERT INTO `sys_apis` VALUES (28, '2019-10-09 15:15:17', '2019-10-09 15:17:07', NULL, NULL, '/user/getUserList', '获取用户列表', 'user', 'POST');
INSERT INTO `sys_apis` VALUES (29, '2019-10-09 23:01:40', '2019-10-09 23:01:40', NULL, NULL, '/user/setUserAuthority', '修改用户角色', 'user', 'POST');
INSERT INTO `sys_apis` VALUES (30, '2019-10-26 20:14:38', '2019-10-26 20:14:38', NULL, NULL, '/fileUploadAndDownload/upload', '文件上传示例', 'fileUploadAndDownload', 'POST');
INSERT INTO `sys_apis` VALUES (31, '2019-10-26 20:14:59', '2019-10-26 20:14:59', NULL, NULL, '/fileUploadAndDownload/getFileList', '获取上传文件列表', 'fileUploadAndDownload', 'POST');
INSERT INTO `sys_apis` VALUES (32, '2019-12-12 13:28:47', '2019-12-12 13:28:47', NULL, NULL, '/casbin/updateCasbin', '更改角色api权限', 'casbin', 'POST');
INSERT INTO `sys_apis` VALUES (33, '2019-12-12 13:28:59', '2019-12-12 13:28:59', NULL, NULL, '/casbin/getPolicyPathByAuthorityId', '获取权限列表', 'casbin', 'POST');
INSERT INTO `sys_apis` VALUES (34, '2019-12-12 17:02:15', '2019-12-12 17:02:15', NULL, NULL, '/fileUploadAndDownload/deleteFile', '删除文件', 'fileUploadAndDownload', 'POST');
INSERT INTO `sys_apis` VALUES (35, '2019-12-28 18:18:07', '2019-12-28 18:18:07', NULL, NULL, '/jwt/jsonInBlacklist', 'jwt加入黑名单', 'jwt', 'POST');
INSERT INTO `sys_apis` VALUES (36, '2020-01-06 17:56:36', '2020-01-06 17:56:36', NULL, NULL, '/authority/setDataAuthority', '设置角色资源权限', 'authority', 'POST');
INSERT INTO `sys_apis` VALUES (37, '2020-01-13 14:04:05', '2020-01-13 14:04:05', NULL, NULL, '/system/getSystemConfig', '获取配置文件内容', 'system', 'POST');
INSERT INTO `sys_apis` VALUES (38, '2020-01-13 15:02:06', '2020-01-13 15:02:06', NULL, NULL, '/system/setSystemConfig', '设置配置文件内容', 'system', 'POST');
INSERT INTO `sys_apis` VALUES (39, '2020-02-25 15:32:39', '2020-02-25 15:32:39', NULL, NULL, '/customer/customer', '创建客户', 'customer', 'POST');
INSERT INTO `sys_apis` VALUES (40, '2020-02-25 15:32:51', '2020-02-25 15:34:56', NULL, NULL, '/customer/customer', '更新客户', 'customer', 'PUT');
INSERT INTO `sys_apis` VALUES (41, '2020-02-25 15:33:57', '2020-02-25 15:33:57', NULL, NULL, '/customer/customer', '删除客户', 'customer', 'DELETE');
INSERT INTO `sys_apis` VALUES (42, '2020-02-25 15:36:48', '2020-02-25 15:37:16', NULL, NULL, '/customer/customer', '获取单一客户', 'customer', 'GET');
INSERT INTO `sys_apis` VALUES (43, '2020-02-25 15:37:06', '2020-02-25 15:37:06', NULL, NULL, '/customer/customerList', '获取客户列表', 'customer', 'GET');
INSERT INTO `sys_apis` VALUES (44, '2020-03-12 14:36:54', '2020-03-12 14:56:50', NULL, NULL, '/casbin/casbinTest/:pathParam', 'RESTFUL模式测试', 'casbin', 'GET');
INSERT INTO `sys_apis` VALUES (45, '2020-03-29 23:01:28', '2020-03-29 23:01:28', NULL, NULL, '/autoCode/createTemp', '自动化代码', 'autoCode', 'POST');
INSERT INTO `sys_apis` VALUES (46, '2020-04-15 12:46:58', '2020-04-15 12:46:58', NULL, NULL, '/authority/updateAuthority', '更新角色信息', 'authority', 'PUT');
INSERT INTO `sys_apis` VALUES (47, '2020-04-20 15:14:25', '2020-04-20 15:14:25', NULL, NULL, '/authority/copyAuthority', '拷贝角色', 'authority', 'POST');
INSERT INTO `sys_apis` VALUES (64, '2020-05-10 16:44:25', '2020-05-10 16:44:25', NULL, NULL, '/user/deleteUser', '删除用户', 'user', 'DELETE');
INSERT INTO `sys_apis` VALUES (81, '2020-06-23 18:40:50', '2020-06-23 18:40:50', NULL, NULL, '/sysDictionaryDetail/createSysDictionaryDetail', '新增字典内容', 'sysDictionaryDetail', 'POST');
INSERT INTO `sys_apis` VALUES (82, '2020-06-23 18:40:50', '2020-06-23 18:40:50', NULL, NULL, '/sysDictionaryDetail/deleteSysDictionaryDetail', '删除字典内容', 'sysDictionaryDetail', 'DELETE');
INSERT INTO `sys_apis` VALUES (83, '2020-06-23 18:40:50', '2020-06-23 18:40:50', NULL, NULL, '/sysDictionaryDetail/updateSysDictionaryDetail', '更新字典内容', 'sysDictionaryDetail', 'PUT');
INSERT INTO `sys_apis` VALUES (84, '2020-06-23 18:40:50', '2020-06-23 18:40:50', NULL, NULL, '/sysDictionaryDetail/findSysDictionaryDetail', '根据ID获取字典内容', 'sysDictionaryDetail', 'GET');
INSERT INTO `sys_apis` VALUES (85, '2020-06-23 18:40:50', '2020-06-23 18:40:50', NULL, NULL, '/sysDictionaryDetail/getSysDictionaryDetailList', '获取字典内容列表', 'sysDictionaryDetail', 'GET');
INSERT INTO `sys_apis` VALUES (86, '2020-06-23 18:48:13', '2020-06-23 18:48:13', NULL, NULL, '/sysDictionary/createSysDictionary', '新增字典', 'sysDictionary', 'POST');
INSERT INTO `sys_apis` VALUES (87, '2020-06-23 18:48:13', '2020-06-23 18:48:13', NULL, NULL, '/sysDictionary/deleteSysDictionary', '删除字典', 'sysDictionary', 'DELETE');
INSERT INTO `sys_apis` VALUES (88, '2020-06-23 18:48:13', '2020-06-23 18:48:13', NULL, NULL, '/sysDictionary/updateSysDictionary', '更新字典', 'sysDictionary', 'PUT');
INSERT INTO `sys_apis` VALUES (89, '2020-06-23 18:48:13', '2020-06-23 18:48:13', NULL, NULL, '/sysDictionary/findSysDictionary', '根据ID获取字典', 'sysDictionary', 'GET');
INSERT INTO `sys_apis` VALUES (90, '2020-06-23 18:48:13', '2020-06-23 18:48:13', NULL, NULL, '/sysDictionary/getSysDictionaryList', '获取字典列表', 'sysDictionary', 'GET');
INSERT INTO `sys_apis` VALUES (91, '2020-06-29 13:21:35', '2020-06-29 13:21:35', NULL, NULL, '/sysOperationRecord/createSysOperationRecord', '新增操作记录', 'sysOperationRecord', 'POST');
INSERT INTO `sys_apis` VALUES (92, '2020-06-29 13:21:35', '2020-06-29 13:21:35', NULL, NULL, '/sysOperationRecord/deleteSysOperationRecord', '删除操作记录', 'sysOperationRecord', 'DELETE');
INSERT INTO `sys_apis` VALUES (93, '2020-06-29 13:21:35', '2020-06-29 13:21:35', NULL, NULL, '/sysOperationRecord/updateSysOperationRecord', '更新操作记录', 'sysOperationRecord', 'PUT');
INSERT INTO `sys_apis` VALUES (94, '2020-06-29 13:21:35', '2020-06-29 13:21:35', NULL, NULL, '/sysOperationRecord/findSysOperationRecord', '根据ID获取操作记录', 'sysOperationRecord', 'GET');
INSERT INTO `sys_apis` VALUES (95, '2020-06-29 13:21:35', '2020-06-29 13:21:35', NULL, NULL, '/sysOperationRecord/getSysOperationRecordList', '获取操作记录列表', 'sysOperationRecord', 'GET');
INSERT INTO `sys_apis` VALUES (96, '2020-07-05 14:34:20', '2020-07-05 14:34:20', NULL, NULL, '/autoCode/getTables', '获取数据库表', 'autoCode', 'GET');
INSERT INTO `sys_apis` VALUES (97, '2020-07-05 15:02:07', '2020-07-05 15:02:07', NULL, NULL, '/autoCode/getDB', '获取所有数据库', 'autoCode', 'GET');
INSERT INTO `sys_apis` VALUES (98, '2020-07-05 16:32:08', '2020-07-05 16:32:08', NULL, NULL, '/autoCode/getColume', '获取所选table的所有字段', 'autoCode', 'GET');
INSERT INTO `sys_apis` VALUES (99, '2020-07-07 15:59:53', '2020-07-07 15:59:53', NULL, NULL, '/sysOperationRecord/deleteSysOperationRecordByIds', '批量删除操作历史', 'sysOperationRecord', 'DELETE');
INSERT INTO `sys_apis` VALUES (100, '2020-08-15 12:10:55', '2020-08-15 12:10:55', NULL, NULL, '/simpleUploader/upload', '插件版分片上传', 'simpleUploader', 'POST');
INSERT INTO `sys_apis` VALUES (101, '2020-08-15 19:53:53', '2020-08-15 19:53:53', NULL, NULL, '/simpleUploader/checkFileMd5', '文件完整度验证', 'simpleUploader', 'GET');
INSERT INTO `sys_apis` VALUES (102, '2020-08-15 22:28:04', '2020-08-15 22:28:04', NULL, NULL, '/simpleUploader/mergeFileMd5', '上传完成合并文件', 'simpleUploader', 'GET');
-- ----------------------------
-- Table structure for sys_authorities
-- ----------------------------
DROP TABLE IF EXISTS `sys_authorities`;
CREATE TABLE `sys_authorities` (
`authority_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '角色id',
`authority_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '角色名',
`parent_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '父角色',
`created_at` datetime(0) NULL DEFAULT NULL,
`updated_at` datetime(0) NULL DEFAULT NULL,
`deleted_at` datetime(0) NULL DEFAULT NULL,
PRIMARY KEY (`authority_id`) USING BTREE,
UNIQUE INDEX `authority_id`(`authority_id`) USING BTREE,
INDEX `idx_sys_authorities_deleted_at`(`deleted_at`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Records of sys_authorities
-- ----------------------------
INSERT INTO `sys_authorities` VALUES ('888', '普通用户', '0', '2020-04-04 11:44:56', '2020-06-13 16:07:37', NULL);
INSERT INTO `sys_authorities` VALUES ('8881', '普通用户子角色', '888', '2020-04-04 11:44:56', '2020-04-24 10:16:42', NULL);
INSERT INTO `sys_authorities` VALUES ('9528', '测试角色', '0', '2020-04-04 11:44:56', '2020-04-24 10:16:42', NULL);
-- ----------------------------
-- Table structure for sys_authority_menus
-- ----------------------------
DROP TABLE IF EXISTS `sys_authority_menus`;
CREATE TABLE `sys_authority_menus` (
`sys_authority_authority_id` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL COMMENT '角色id',
`sys_base_menu_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '菜单id',
PRIMARY KEY (`sys_authority_authority_id`, `sys_base_menu_id`) USING BTREE,
INDEX `sys_authority_authority_id`(`sys_authority_authority_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Records of sys_authority_menus
-- ----------------------------
INSERT INTO `sys_authority_menus` VALUES ('888', 1);
INSERT INTO `sys_authority_menus` VALUES ('888', 2);
INSERT INTO `sys_authority_menus` VALUES ('888', 3);
INSERT INTO `sys_authority_menus` VALUES ('888', 4);
INSERT INTO `sys_authority_menus` VALUES ('888', 5);
INSERT INTO `sys_authority_menus` VALUES ('888', 6);
INSERT INTO `sys_authority_menus` VALUES ('888', 17);
INSERT INTO `sys_authority_menus` VALUES ('888', 18);
INSERT INTO `sys_authority_menus` VALUES ('888', 19);
INSERT INTO `sys_authority_menus` VALUES ('888', 20);
INSERT INTO `sys_authority_menus` VALUES ('888', 21);
INSERT INTO `sys_authority_menus` VALUES ('888', 22);
INSERT INTO `sys_authority_menus` VALUES ('888', 23);
INSERT INTO `sys_authority_menus` VALUES ('888', 26);
INSERT INTO `sys_authority_menus` VALUES ('888', 33);
INSERT INTO `sys_authority_menus` VALUES ('888', 34);
INSERT INTO `sys_authority_menus` VALUES ('888', 38);
INSERT INTO `sys_authority_menus` VALUES ('888', 40);
INSERT INTO `sys_authority_menus` VALUES ('888', 41);
INSERT INTO `sys_authority_menus` VALUES ('888', 42);
INSERT INTO `sys_authority_menus` VALUES ('888', 50);
INSERT INTO `sys_authority_menus` VALUES ('888', 51);
INSERT INTO `sys_authority_menus` VALUES ('888', 52);
INSERT INTO `sys_authority_menus` VALUES ('888', 53);
INSERT INTO `sys_authority_menus` VALUES ('8881', 1);
INSERT INTO `sys_authority_menus` VALUES ('8881', 2);
INSERT INTO `sys_authority_menus` VALUES ('8881', 18);
INSERT INTO `sys_authority_menus` VALUES ('8881', 38);
INSERT INTO `sys_authority_menus` VALUES ('8881', 40);
INSERT INTO `sys_authority_menus` VALUES ('8881', 41);
INSERT INTO `sys_authority_menus` VALUES ('8881', 42);
INSERT INTO `sys_authority_menus` VALUES ('9528', 1);
INSERT INTO `sys_authority_menus` VALUES ('9528', 2);
INSERT INTO `sys_authority_menus` VALUES ('9528', 3);
INSERT INTO `sys_authority_menus` VALUES ('9528', 4);
INSERT INTO `sys_authority_menus` VALUES ('9528', 5);
INSERT INTO `sys_authority_menus` VALUES ('9528', 6);
INSERT INTO `sys_authority_menus` VALUES ('9528', 17);
INSERT INTO `sys_authority_menus` VALUES ('9528', 18);
INSERT INTO `sys_authority_menus` VALUES ('9528', 19);
INSERT INTO `sys_authority_menus` VALUES ('9528', 20);
INSERT INTO `sys_authority_menus` VALUES ('9528', 21);
INSERT INTO `sys_authority_menus` VALUES ('9528', 22);
INSERT INTO `sys_authority_menus` VALUES ('9528', 23);
INSERT INTO `sys_authority_menus` VALUES ('9528', 26);
INSERT INTO `sys_authority_menus` VALUES ('9528', 33);
INSERT INTO `sys_authority_menus` VALUES ('9528', 34);
INSERT INTO `sys_authority_menus` VALUES ('9528', 38);
INSERT INTO `sys_authority_menus` VALUES ('9528', 40);
INSERT INTO `sys_authority_menus` VALUES ('9528', 41);
INSERT INTO `sys_authority_menus` VALUES ('9528', 42);
-- ----------------------------
-- Table structure for sys_base_menu_parameters
-- ----------------------------
DROP TABLE IF EXISTS `sys_base_menu_parameters`;
CREATE TABLE `sys_base_menu_parameters` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`created_at` datetime(0) NULL DEFAULT NULL,
`updated_at` datetime(0) NULL DEFAULT NULL,
`deleted_at` datetime(0) NULL DEFAULT NULL,
`sys_base_menu_id` int(10) UNSIGNED NULL DEFAULT NULL,
`type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
`key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
`value` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_sys_base_menu_parameters_deleted_at`(`deleted_at`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for sys_base_menus
-- ----------------------------
DROP TABLE IF EXISTS `sys_base_menus`;
CREATE TABLE `sys_base_menus` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`created_at` timestamp(0) NULL DEFAULT NULL,
`updated_at` timestamp(0) NULL DEFAULT NULL,
`deleted_at` timestamp(0) NULL DEFAULT NULL,
`menu_level` int(10) UNSIGNED NULL DEFAULT NULL COMMENT '菜单等级(暂未使用)',
`parent_id` int(10) UNSIGNED NULL DEFAULT NULL COMMENT '父菜单id',
`path` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '菜单path(路由path)',
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '菜单name(路由name)',
`hidden` tinyint(1) NULL DEFAULT NULL COMMENT '是否在列表隐藏',
`component` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '组件位置',
`title` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '显示名字',
`icon` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '显示图标',
`nick_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '菜单别名',
`sort` int(255) NULL DEFAULT NULL COMMENT '排序',
`keep_alive` tinyint(1) NULL DEFAULT NULL COMMENT '是否缓存菜单内容',
`default_menu` tinyint(1) NULL DEFAULT NULL COMMENT '默认菜单(暂未使用)',
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_base_menus_deleted_at`(`deleted_at`) USING BTREE,
INDEX `idx_sys_base_menus_deleted_at`(`deleted_at`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 54 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Records of sys_base_menus
-- ----------------------------
INSERT INTO `sys_base_menus` VALUES (1, '2019-09-19 22:05:18', '2020-05-30 15:43:06', NULL, 0, 0, 'dashboard', 'dashboard', 0, 'view/dashboard/index.vue', '仪表盘', 'setting', '仪表盘', 1, 0, 0);
INSERT INTO `sys_base_menus` VALUES (2, '2019-09-19 22:06:17', '2020-08-11 23:26:21', NULL, 0, 0, 'about', 'about', 0, 'view/about/index.vue', '关于我们', 'info', '测试菜单', 7, 0, 0);
INSERT INTO `sys_base_menus` VALUES (3, '2019-09-19 22:06:38', '2020-04-24 10:16:43', NULL, 0, 0, 'admin', 'superAdmin', 0, 'view/superAdmin/index.vue', '超级管理员', 'user-solid', '超级管理员', 3, 0, 0);
INSERT INTO `sys_base_menus` VALUES (4, '2019-09-19 22:11:53', '2020-05-30 15:43:25', NULL, 0, 3, 'authority', 'authority', 0, 'view/superAdmin/authority/authority.vue', '角色管理', 's-custom', '角色管理', 1, 0, 0);
INSERT INTO `sys_base_menus` VALUES (5, '2019-09-19 22:13:18', '2020-04-30 17:45:27', NULL, 0, 3, 'menu', 'menu', 0, 'view/superAdmin/menu/menu.vue', '菜单管理', 's-order', '菜单管理', 2, 1, 0);
INSERT INTO `sys_base_menus` VALUES (6, '2019-09-19 22:13:36', '2020-04-24 10:16:43', NULL, 0, 3, 'api', 'api', 0, 'view/superAdmin/api/api.vue', 'api管理', 's-platform', 'api管理', 3, 1, 0);
INSERT INTO `sys_base_menus` VALUES (17, '2019-10-09 15:12:29', '2020-04-24 10:16:43', NULL, 0, 3, 'user', 'user', 0, 'view/superAdmin/user/user.vue', '用户管理', 'coordinate', '用户管理', 4, 0, 0);
INSERT INTO `sys_base_menus` VALUES (18, '2019-10-15 22:27:22', '2020-05-10 21:31:36', NULL, 0, 0, 'person', 'person', 1, 'view/person/person.vue', '个人信息', 'message-solid', '个人信息', 4, 0, 0);
INSERT INTO `sys_base_menus` VALUES (19, '2019-10-20 11:14:42', '2020-04-24 10:16:43', NULL, 0, 0, 'example', 'example', 0, 'view/example/index.vue', '示例文件', 's-management', '示例文件', 6, 0, 0);
INSERT INTO `sys_base_menus` VALUES (20, '2019-10-20 11:18:11', '2020-04-24 10:16:42', NULL, 0, 19, 'table', 'table', 0, 'view/example/table/table.vue', '表格示例', 's-order', '表格示例', 1, 0, 0);
INSERT INTO `sys_base_menus` VALUES (21, '2019-10-20 11:19:52', '2020-04-24 10:16:43', NULL, 0, 19, 'form', 'form', 0, 'view/example/form/form.vue', '表单示例', 'document', '表单示例', 2, 0, 0);
INSERT INTO `sys_base_menus` VALUES (22, '2019-10-20 11:22:19', '2020-04-24 10:16:43', NULL, 0, 19, 'rte', 'rte', 0, 'view/example/rte/rte.vue', '富文本编辑器', 'reading', '富文本编辑器', 3, 0, 0);
INSERT INTO `sys_base_menus` VALUES (23, '2019-10-20 11:23:39', '2020-04-24 10:16:43', NULL, 0, 19, 'excel', 'excel', 0, 'view/example/excel/excel.vue', 'excel导入导出', 's-marketing', 'excel导入导出', 4, 0, 0);
INSERT INTO `sys_base_menus` VALUES (26, '2019-10-20 11:27:02', '2020-04-24 10:16:43', NULL, 0, 19, 'upload', 'upload', 0, 'view/example/upload/upload.vue', '上传下载', 'upload', '上传下载', 5, 0, 0);
INSERT INTO `sys_base_menus` VALUES (33, '2020-02-17 16:20:47', '2020-04-24 10:16:43', NULL, 0, 19, 'breakpoint', 'breakpoint', 0, 'view/example/breakpoint/breakpoint.vue', '断点续传', 'upload', '断点续传', 6, 0, 0);
INSERT INTO `sys_base_menus` VALUES (34, '2020-02-24 19:48:37', '2020-04-24 10:16:43', NULL, 0, 19, 'customer', 'customer', 0, 'view/example/customer/customer.vue', '客户列表(资源示例)', 's-custom', '客户列表(资源示例)', 7, 0, 0);
INSERT INTO `sys_base_menus` VALUES (38, '2020-03-29 21:31:03', '2020-04-24 10:16:43', NULL, 0, 0, 'systemTools', 'systemTools', 0, 'view/systemTools/index.vue', '系统工具', 's-cooperation', '系统工具', 5, 0, 0);
INSERT INTO `sys_base_menus` VALUES (40, '2020-03-29 21:35:10', '2020-05-03 21:38:49', NULL, 0, 38, 'autoCode', 'autoCode', 0, 'view/systemTools/autoCode/index.vue', '代码生成器', 'cpu', '代码生成器', 1, 1, 0);
INSERT INTO `sys_base_menus` VALUES (41, '2020-03-29 21:36:26', '2020-05-03 21:38:43', NULL, 0, 38, 'formCreate', 'formCreate', 0, 'view/systemTools/formCreate/index.vue', '表单生成器', 'magic-stick', '表单生成器', 2, 1, 0);
INSERT INTO `sys_base_menus` VALUES (42, '2020-04-02 14:19:36', '2020-04-24 10:16:43', NULL, 0, 38, 'system', 'system', 0, 'view/systemTools/system/system.vue', '系统配置', 's-operation', '系统配置', 3, 0, 0);
INSERT INTO `sys_base_menus` VALUES (45, '2020-04-29 17:19:34', '2020-07-04 18:27:22', NULL, 0, 0, 'iconList', 'iconList', 0, 'view/iconList/index.vue', '图标集合', 'star-on', NULL, 2, 0, 0);
INSERT INTO `sys_base_menus` VALUES (50, '2020-06-24 19:49:54', '2020-06-28 20:34:47', NULL, 0, 3, 'dictionary', 'dictionary', 0, 'view/superAdmin/dictionary/sysDictionary.vue', '字典管理', 'notebook-2', NULL, 5, 0, 0);
INSERT INTO `sys_base_menus` VALUES (51, '2020-06-24 19:51:33', '2020-06-28 20:35:04', NULL, 0, 3, 'dictionaryDetail/:id', 'dictionaryDetail', 1, 'view/superAdmin/dictionary/sysDictionaryDetail.vue', '字典详情', 's-order', NULL, 1, 0, 0);
INSERT INTO `sys_base_menus` VALUES (52, '2020-06-29 13:31:17', '2020-07-07 16:05:34', NULL, 0, 3, 'operation', 'operation', 0, 'view/superAdmin/operation/sysOperationRecord.vue', '操作历史', 'time', NULL, 6, 0, 0);
INSERT INTO `sys_base_menus` VALUES (53, '2020-08-15 11:41:49', '2020-08-15 11:43:15', NULL, 0, 19, 'simpleUploader', 'simpleUploader', 0, 'view/example/simpleUploader/simpleUploader', '断点续传(插件版)', 'upload', NULL, 6, 0, 0);
-- ----------------------------
-- Table structure for sys_data_authority_id
-- ----------------------------
DROP TABLE IF EXISTS `sys_data_authority_id`;
CREATE TABLE `sys_data_authority_id` (
`sys_authority_authority_id` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL COMMENT '角色id',
`data_authority_id` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL COMMENT '拥有的资源角色id',
PRIMARY KEY (`sys_authority_authority_id`, `data_authority_id`) USING BTREE,
INDEX `sys_authority_authority_id`(`sys_authority_authority_id`) USING BTREE,
INDEX `data_authority_id`(`data_authority_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Records of sys_data_authority_id
-- ----------------------------
INSERT INTO `sys_data_authority_id` VALUES ('888', '888');
INSERT INTO `sys_data_authority_id` VALUES ('888', '8881');
INSERT INTO `sys_data_authority_id` VALUES ('888', '9528');
INSERT INTO `sys_data_authority_id` VALUES ('888222', '888');
INSERT INTO `sys_data_authority_id` VALUES ('888222', '8881');
INSERT INTO `sys_data_authority_id` VALUES ('888222', '9528');
INSERT INTO `sys_data_authority_id` VALUES ('8883', '888');
INSERT INTO `sys_data_authority_id` VALUES ('8883', '8881');
INSERT INTO `sys_data_authority_id` VALUES ('8883', '9528');
INSERT INTO `sys_data_authority_id` VALUES ('9528', '8881');
INSERT INTO `sys_data_authority_id` VALUES ('9528', '9528');
-- ----------------------------
-- Table structure for sys_dictionaries
-- ----------------------------
DROP TABLE IF EXISTS `sys_dictionaries`;
CREATE TABLE `sys_dictionaries` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`created_at` datetime(0) NULL DEFAULT NULL,
`updated_at` datetime(0) NULL DEFAULT NULL,
`deleted_at` datetime(0) NULL DEFAULT NULL,
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '字典名(中)',
`type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '字典名(英)',
`status` tinyint(1) NULL DEFAULT NULL COMMENT '状态',
`desc` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '描述',
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_sys_dictionaries_deleted_at`(`deleted_at`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Records of sys_dictionaries
-- ----------------------------
INSERT INTO `sys_dictionaries` VALUES (2, '2020-06-24 20:44:00', '2020-06-24 20:44:00', NULL, '性别', 'sex', 1, '性别字典');
INSERT INTO `sys_dictionaries` VALUES (3, '2020-07-05 15:27:31', '2020-07-05 15:27:31', NULL, '数据库int类型', 'int', 1, 'int类型对应的数据库类型');
INSERT INTO `sys_dictionaries` VALUES (4, '2020-07-05 15:33:07', '2020-07-05 16:07:18', NULL, '数据库时间日期类型', 'time.Time', 1, '数据库时间日期类型');
INSERT INTO `sys_dictionaries` VALUES (5, '2020-07-05 15:34:23', '2020-07-05 15:52:45', NULL, '数据库浮点型', 'float64', 1, '数据库浮点型');
INSERT INTO `sys_dictionaries` VALUES (6, '2020-07-05 15:35:05', '2020-07-05 15:35:05', NULL, '数据库字符串', 'string', 1, '数据库字符串');
INSERT INTO `sys_dictionaries` VALUES (7, '2020-07-05 15:36:48', '2020-07-05 15:36:48', NULL, '数据库bool类型', 'bool', 1, '数据库bool类型');
-- ----------------------------
-- Table structure for sys_dictionary_details
-- ----------------------------
DROP TABLE IF EXISTS `sys_dictionary_details`;
CREATE TABLE `sys_dictionary_details` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`created_at` datetime(0) NULL DEFAULT NULL,
`updated_at` datetime(0) NULL DEFAULT NULL,
`deleted_at` datetime(0) NULL DEFAULT NULL,
`label` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '展示值',
`value` int(11) NULL DEFAULT NULL COMMENT '字典值',
`status` tinyint(1) NULL DEFAULT NULL COMMENT '启用状态',
`sort` int(11) NULL DEFAULT NULL COMMENT '排序标记',
`sys_dictionary_id` int(11) NULL DEFAULT NULL COMMENT '关联标记',
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_sys_dictionary_details_deleted_at`(`deleted_at`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 38 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Records of sys_dictionary_details
-- ----------------------------
INSERT INTO `sys_dictionary_details` VALUES (12, '2020-07-05 15:31:41', '2020-07-05 15:31:41', NULL, 'smallint', 1, 1, 1, 3);
INSERT INTO `sys_dictionary_details` VALUES (13, '2020-07-05 15:31:52', '2020-07-05 15:31:52', NULL, 'mediumint', 2, 1, 2, 3);
INSERT INTO `sys_dictionary_details` VALUES (14, '2020-07-05 15:32:04', '2020-07-05 15:32:04', NULL, 'int', 3, 1, 3, 3);
INSERT INTO `sys_dictionary_details` VALUES (15, '2020-07-05 15:32:11', '2020-07-05 15:32:11', NULL, 'bigint', 4, 1, 4, 3);
INSERT INTO `sys_dictionary_details` VALUES (19, '2020-07-05 15:33:16', '2020-07-05 15:33:16', NULL, 'data', 0, 1, 0, 4);
INSERT INTO `sys_dictionary_details` VALUES (20, '2020-07-05 15:33:21', '2020-07-05 15:33:21', NULL, 'time', 1, 1, 1, 4);
INSERT INTO `sys_dictionary_details` VALUES (21, '2020-07-05 15:33:25', '2020-07-05 15:33:25', NULL, 'year', 2, 1, 2, 4);
INSERT INTO `sys_dictionary_details` VALUES (22, '2020-07-05 15:33:35', '2020-07-05 15:33:35', NULL, 'datetime', 3, 1, 3, 4);
INSERT INTO `sys_dictionary_details` VALUES (23, '2020-07-05 15:33:42', '2020-07-05 15:33:42', NULL, 'timestamp', 5, 1, 5, 4);
INSERT INTO `sys_dictionary_details` VALUES (24, '2020-07-05 15:34:30', '2020-07-05 15:34:30', NULL, 'float', 0, 1, 0, 5);
INSERT INTO `sys_dictionary_details` VALUES (25, '2020-07-05 15:34:35', '2020-07-05 15:34:35', NULL, 'double', 1, 1, 1, 5);
INSERT INTO `sys_dictionary_details` VALUES (26, '2020-07-05 15:34:41', '2020-07-05 15:34:41', NULL, 'decimal', 2, 1, 2, 5);
INSERT INTO `sys_dictionary_details` VALUES (27, '2020-07-05 15:37:45', '2020-07-05 15:37:45', NULL, 'tinyint', 0, 1, 0, 7);
INSERT INTO `sys_dictionary_details` VALUES (28, '2020-07-05 15:53:25', '2020-07-05 15:53:25', NULL, 'char', 0, 1, 0, 6);
INSERT INTO `sys_dictionary_details` VALUES (29, '2020-07-05 15:53:29', '2020-07-05 15:53:29', NULL, 'varchar', 1, 1, 1, 6);
INSERT INTO `sys_dictionary_details` VALUES (30, '2020-07-05 15:53:35', '2020-07-05 15:53:35', NULL, 'tinyblob', 2, 1, 2, 6);
INSERT INTO `sys_dictionary_details` VALUES (31, '2020-07-05 15:53:40', '2020-07-05 15:53:40', NULL, 'tinytext', 3, 1, 3, 6);
INSERT INTO `sys_dictionary_details` VALUES (32, '2020-07-05 15:53:48', '2020-07-05 15:53:48', NULL, 'text', 4, 1, 4, 6);
INSERT INTO `sys_dictionary_details` VALUES (33, '2020-07-05 15:53:55', '2020-07-05 15:53:55', NULL, 'blob', 5, 1, 5, 6);
INSERT INTO `sys_dictionary_details` VALUES (34, '2020-07-05 15:54:02', '2020-07-05 15:54:02', NULL, 'mediumblob', 6, 1, 6, 6);
INSERT INTO `sys_dictionary_details` VALUES (35, '2020-07-05 15:54:09', '2020-07-05 15:54:09', NULL, 'mediumtext', 7, 1, 7, 6);
INSERT INTO `sys_dictionary_details` VALUES (36, '2020-07-05 15:54:16', '2020-07-05 15:54:16', NULL, 'longblob', 8, 1, 8, 6);
INSERT INTO `sys_dictionary_details` VALUES (37, '2020-07-05 15:54:24', '2020-07-05 15:54:24', NULL, 'longtext', 9, 1, 9, 6);
-- ----------------------------
-- Table structure for sys_operation_records
-- ----------------------------
DROP TABLE IF EXISTS `sys_operation_records`;
CREATE TABLE `sys_operation_records` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`created_at` datetime(0) NULL DEFAULT NULL,
`updated_at` datetime(0) NULL DEFAULT NULL,
`deleted_at` datetime(0) NULL DEFAULT NULL,
`ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '请求ip',
`method` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '请求方法',
`path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '请求路由',
`status` int(11) NULL DEFAULT NULL COMMENT '状态',
`latency` bigint(20) NULL DEFAULT NULL,
`agent` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
`error_message` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
`body` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL COMMENT '请求Body',
`user_id` int(11) NULL DEFAULT NULL COMMENT '用户id',
`resp` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL COMMENT '响应Body',
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_sys_operation_records_deleted_at`(`deleted_at`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 358 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for sys_users
-- ----------------------------
DROP TABLE IF EXISTS `sys_users`;
CREATE TABLE `sys_users` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`created_at` timestamp(0) NULL DEFAULT NULL,
`updated_at` timestamp(0) NULL DEFAULT NULL,
`deleted_at` timestamp(0) NULL DEFAULT NULL,
`uuid` varbinary(255) NULL DEFAULT NULL COMMENT 'uuid',
`nick_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'QMPlusUser' COMMENT '用户昵称',
`header_img` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'http://www.henrongyi.top/avatar/lufu.jpg' COMMENT '用户头像',
`authority_id` double NULL DEFAULT 888 COMMENT '用户角色',
`username` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '登录用户名',
`password` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '登录密码',
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_users_deleted_at`(`deleted_at`) USING BTREE,
INDEX `idx_sys_users_deleted_at`(`deleted_at`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Records of sys_users
-- ----------------------------
INSERT INTO `sys_users` VALUES (10, '2019-09-13 17:23:46', '2020-06-26 21:17:50', NULL, 0x63653064363638352D633135662D343132362D613562342D383930626339643233353664, '超级管理员', 'http://qmplusimg.henrongyi.top/1571627762timg.jpg', 888, 'admin', 'e10adc3949ba59abbe56e057f20f883e');
INSERT INTO `sys_users` VALUES (11, '2019-09-13 17:27:29', '2019-09-13 17:27:29', NULL, 0x66643665663739622D393434632D343838382D383337372D616265326432363038383538, 'QMPlusUser', 'http://qmplusimg.henrongyi.top/1572075907logo.png', 9528, 'a303176530', '3ec063004a6f31642261936a379fde3d');
-- ----------------------------
-- Table structure for sys_workflow_step_infos
-- ----------------------------
DROP TABLE IF EXISTS `sys_workflow_step_infos`;
CREATE TABLE `sys_workflow_step_infos` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`created_at` timestamp(0) NULL DEFAULT NULL,
`updated_at` timestamp(0) NULL DEFAULT NULL,
`deleted_at` timestamp(0) NULL DEFAULT NULL,
`workflow_id` int(10) UNSIGNED NULL DEFAULT NULL COMMENT '节点id',
`is_strat` tinyint(1) NULL DEFAULT NULL COMMENT '是否是开始节点',
`step_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '步骤name',
`step_no` double NULL DEFAULT NULL COMMENT '第几步',
`step_authority_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '可操作者角色',
`is_end` tinyint(1) NULL DEFAULT NULL COMMENT '是否是结尾',
`sys_workflow_id` int(10) UNSIGNED NULL DEFAULT NULL COMMENT '关联工作流id',
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_workflow_step_infos_deleted_at`(`deleted_at`) USING BTREE,
INDEX `idx_sys_workflow_step_infos_deleted_at`(`deleted_at`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for sys_workflows
-- ----------------------------
DROP TABLE IF EXISTS `sys_workflows`;
CREATE TABLE `sys_workflows` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`created_at` datetime(0) NULL DEFAULT NULL,
`updated_at` datetime(0) NULL DEFAULT NULL,
`deleted_at` datetime(0) NULL DEFAULT NULL,
`workflow_nick_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '工作流中文名称',
`workflow_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '工作流英文名称',
`workflow_description` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '工作流描述',
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_sys_workflows_deleted_at`(`deleted_at`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- View structure for authority_menu
-- ----------------------------
DROP VIEW IF EXISTS `authority_menu`;
CREATE ALGORITHM = UNDEFINED SQL SECURITY DEFINER VIEW `authority_menu` AS select `sys_base_menus`.`id` AS `id`,`sys_base_menus`.`created_at` AS `created_at`,`sys_base_menus`.`updated_at` AS `updated_at`,`sys_base_menus`.`deleted_at` AS `deleted_at`,`sys_base_menus`.`menu_level` AS `menu_level`,`sys_base_menus`.`parent_id` AS `parent_id`,`sys_base_menus`.`path` AS `path`,`sys_base_menus`.`name` AS `name`,`sys_base_menus`.`hidden` AS `hidden`,`sys_base_menus`.`component` AS `component`,`sys_base_menus`.`title` AS `title`,`sys_base_menus`.`icon` AS `icon`,`sys_base_menus`.`nick_name` AS `nick_name`,`sys_base_menus`.`sort` AS `sort`,`sys_authority_menus`.`sys_authority_authority_id` AS `authority_id`,`sys_authority_menus`.`sys_base_menu_id` AS `menu_id`,`sys_base_menus`.`keep_alive` AS `keep_alive`,`sys_base_menus`.`default_menu` AS `default_menu` from (`sys_authority_menus` join `sys_base_menus` on((`sys_authority_menus`.`sys_base_menu_id` = `sys_base_menus`.`id`)));
SET FOREIGN_KEY_CHECKS = 1;
-284
View File
@@ -1,284 +0,0 @@
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/base/login','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/base/register','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/api/createApi','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/api/getApiList','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/api/getApiById','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/api/deleteApi','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/api/updateApi','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/api/getAllApis','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/authority/createAuthority','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/authority/deleteAuthority','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/authority/getAuthorityList','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/authority/setDataAuthority','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/menu/getMenu','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/menu/getMenuList','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/menu/addBaseMenu','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/menu/getBaseMenuTree','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/menu/addMenuAuthority','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/menu/getMenuAuthority','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/menu/deleteBaseMenu','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/menu/updateBaseMenu','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/menu/getBaseMenuById','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/user/changePassword','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/user/uploadHeaderImg','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/user/getInfoList','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/user/getUserList','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/user/setUserAuthority','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/fileUploadAndDownload/upload','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/fileUploadAndDownload/getFileList','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/fileUploadAndDownload/deleteFile','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/casbin/updateCasbin','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/casbin/getPolicyPathByAuthorityId','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/jwt/jsonInBlacklist','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/system/getSystemConfig','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/system/setSystemConfig','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/customer/customer','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/customer/customer','PUT','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/customer/customer','DELETE','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/customer/customer','GET','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','8881','/customer/customerList','GET','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/base/login','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/base/register','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/api/createApi','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/api/getApiList','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/api/getApiById','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/api/deleteApi','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/api/updateApi','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/api/getAllApis','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/authority/createAuthority','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/authority/deleteAuthority','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/authority/getAuthorityList','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/authority/setDataAuthority','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/menu/getMenu','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/menu/getMenuList','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/menu/addBaseMenu','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/menu/getBaseMenuTree','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/menu/addMenuAuthority','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/menu/getMenuAuthority','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/menu/deleteBaseMenu','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/menu/updateBaseMenu','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/menu/getBaseMenuById','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/user/changePassword','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/user/uploadHeaderImg','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/user/getInfoList','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/user/getUserList','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/user/setUserAuthority','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/fileUploadAndDownload/upload','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/fileUploadAndDownload/getFileList','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/fileUploadAndDownload/deleteFile','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/casbin/updateCasbin','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/casbin/getPolicyPathByAuthorityId','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/jwt/jsonInBlacklist','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/system/getSystemConfig','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/system/setSystemConfig','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/customer/customer','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/customer/customer','PUT','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/customer/customer','DELETE','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/customer/customer','GET','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/customer/customerList','GET','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','9528','/autoCode/createTemp','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/base/login','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/base/register','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/api/createApi','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/api/getApiList','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/api/getApiById','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/api/deleteApi','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/api/updateApi','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/api/getAllApis','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/authority/createAuthority','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/authority/deleteAuthority','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/authority/getAuthorityList','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/authority/setDataAuthority','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/menu/getMenu','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/menu/getMenuList','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/menu/addBaseMenu','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/menu/getBaseMenuTree','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/menu/addMenuAuthority','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/menu/getMenuAuthority','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/menu/deleteBaseMenu','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/menu/updateBaseMenu','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/menu/getBaseMenuById','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/user/changePassword','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/user/uploadHeaderImg','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/user/getInfoList','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/user/getUserList','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/user/setUserAuthority','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/fileUploadAndDownload/upload','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/fileUploadAndDownload/getFileList','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/fileUploadAndDownload/deleteFile','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/casbin/updateCasbin','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/casbin/getPolicyPathByAuthorityId','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/casbin/casbinTest/:pathParam','GET','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/jwt/jsonInBlacklist','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/system/getSystemConfig','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/system/setSystemConfig','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/customer/customer','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/customer/customer','PUT','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/customer/customer','DELETE','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/customer/customer','GET','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/customer/customerList','GET','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','888','/autoCode/createTemp','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','asdasd','/base/login','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','asdasd','/base/register','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','asdasd','/api/createApi','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','asdasd','/api/getApiList','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','asdasd','/api/getApiById','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','asdasd','/api/deleteApi','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','asdasd','/api/updateApi','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','asdasd','/api/getAllApis','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','asdasd','/api/createApi','GET','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','asdasd','/authority/createAuthority','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','asdasd','/authority/deleteAuthority','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','asdasd','/authority/getAuthorityList','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','asdasd','/authority/setDataAuthority','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','asdasd','/menu/getMenu','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','asdasd','/menu/getMenuList','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','asdasd','/menu/addBaseMenu','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','asdasd','/menu/getBaseMenuTree','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','asdasd','/menu/addMenuAuthority','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','asdasd','/menu/getMenuAuthority','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','asdasd','/menu/deleteBaseMenu','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','asdasd','/menu/updateBaseMenu','POST','','','');
INSERT INTO casbin_rule (p_type,v0,v1,v2,v3,v4,v5) VALUES (
'p','asdasd','/menu/getBaseMenuById','POST','','','');
-650
View File
@@ -1,650 +0,0 @@
INSERT INTO ch_cities (id,province,city,code) VALUES (
1,'北京市','北京市',110100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
2,'天津市','天津市',120100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
3,'河北省','石家庄市',130100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
4,'河北省','唐山市',130200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
5,'河北省','秦皇岛市',130300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
6,'河北省','邯郸市',130400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
7,'河北省','邢台市',130500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
8,'河北省','保定市',130600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
9,'河北省','张家口市',130700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
10,'河北省','承德市',130800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
11,'河北省','沧州市',130900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
12,'河北省','廊坊市',131000);
INSERT INTO ch_cities (id,province,city,code) VALUES (
13,'河北省','衡水市',131100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
14,'山西省','太原市',140100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
15,'山西省','大同市',140200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
16,'山西省','阳泉市',140300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
17,'山西省','长治市',140400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
18,'山西省','晋城市',140500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
19,'山西省','朔州市',140600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
20,'山西省','晋中市',140700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
21,'山西省','运城市',140800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
22,'山西省','忻州市',140900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
23,'山西省','临汾市',141000);
INSERT INTO ch_cities (id,province,city,code) VALUES (
24,'山西省','吕梁市',141100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
25,'内蒙古自治区','呼和浩特市',150100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
26,'内蒙古自治区','包头市',150200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
27,'内蒙古自治区','乌海市',150300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
28,'内蒙古自治区','赤峰市',150400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
29,'内蒙古自治区','通辽市',150500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
30,'内蒙古自治区','鄂尔多斯市',150600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
31,'内蒙古自治区','呼伦贝尔市',150700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
32,'内蒙古自治区','巴彦淖尔市',150800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
33,'内蒙古自治区','乌兰察布市',150900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
34,'内蒙古自治区','兴安盟',152200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
35,'内蒙古自治区','锡林郭勒盟',152500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
36,'内蒙古自治区','二连浩特市',152501);
INSERT INTO ch_cities (id,province,city,code) VALUES (
37,'内蒙古自治区','锡林浩特市',152502);
INSERT INTO ch_cities (id,province,city,code) VALUES (
38,'内蒙古自治区','阿拉善盟',152900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
39,'辽宁省','沈阳市',210100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
40,'辽宁省','大连市',210200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
41,'辽宁省','鞍山市',210300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
42,'辽宁省','抚顺市',210400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
43,'辽宁省','本溪市',210500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
44,'辽宁省','丹东市',210600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
45,'辽宁省','锦州市',210700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
46,'辽宁省','营口市',210800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
47,'辽宁省','阜新市',210900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
48,'辽宁省','辽阳市',211000);
INSERT INTO ch_cities (id,province,city,code) VALUES (
49,'辽宁省','盘锦市',211100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
50,'辽宁省','铁岭市',211200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
51,'辽宁省','朝阳市',211300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
52,'辽宁省','葫芦岛市',211400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
53,'吉林省','长春市',220100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
54,'吉林省','吉林市',220200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
55,'吉林省','四平市',220300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
56,'吉林省','辽源市',220400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
57,'吉林省','通化市',220500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
58,'吉林省','白山市',220600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
59,'吉林省','松原市',220700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
60,'吉林省','白城市',220800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
61,'吉林省','延边朝鲜族自治州',222400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
62,'黑龙江省','哈尔滨市',230100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
63,'黑龙江省','齐齐哈尔市',230200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
64,'黑龙江省','鸡西市',230300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
65,'黑龙江省','鹤岗市',230400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
66,'黑龙江省','双鸭山市',230500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
67,'黑龙江省','大庆市',230600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
68,'黑龙江省','伊春市',230700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
69,'黑龙江省','佳木斯市',230800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
70,'黑龙江省','七台河市',230900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
71,'黑龙江省','牡丹江市',231000);
INSERT INTO ch_cities (id,province,city,code) VALUES (
72,'黑龙江省','黑河市',231100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
73,'黑龙江省','绥化市',231200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
74,'黑龙江省','大兴安岭地区',232700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
75,'上海市','上海市',310100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
76,'江苏省','南京市',320100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
77,'江苏省','无锡市',320200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
78,'江苏省','徐州市',320300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
79,'江苏省','常州市',320400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
80,'江苏省','苏州市',320500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
81,'江苏省','昆山市',320583);
INSERT INTO ch_cities (id,province,city,code) VALUES (
82,'江苏省','南通市',320600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
83,'江苏省','连云港市',320700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
84,'江苏省','淮安市',320800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
85,'江苏省','盐城市',320900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
86,'江苏省','扬州市',321000);
INSERT INTO ch_cities (id,province,city,code) VALUES (
87,'江苏省','镇江市',321100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
88,'江苏省','泰州市',321200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
89,'江苏省','宿迁市',321300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
90,'浙江省','杭州市',330100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
91,'浙江省','宁波市',330200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
92,'浙江省','温州市',330300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
93,'浙江省','嘉兴市',330400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
94,'浙江省','湖州市',330500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
95,'浙江省','绍兴市',330600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
96,'浙江省','金华市',330700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
97,'浙江省','衢州市',330800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
98,'浙江省','舟山市',330900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
99,'浙江省','台州市',331000);
INSERT INTO ch_cities (id,province,city,code) VALUES (
100,'浙江省','丽水市',331100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
101,'安徽省','合肥市',340100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
102,'安徽省','芜湖市',340200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
103,'安徽省','蚌埠市',340300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
104,'安徽省','淮南市',340400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
105,'安徽省','马鞍山市',340500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
106,'安徽省','淮北市',340600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
107,'安徽省','铜陵市',340700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
108,'安徽省','安庆市',340800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
109,'安徽省','黄山市',341000);
INSERT INTO ch_cities (id,province,city,code) VALUES (
110,'安徽省','滁州市',341100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
111,'安徽省','阜阳市',341200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
112,'安徽省','宿州市',341300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
113,'安徽省','六安市',341500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
114,'安徽省','亳州市',341600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
115,'安徽省','池州市',341700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
116,'安徽省','宣城市',341800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
117,'福建省','福州市',350100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
118,'福建省','厦门市',350200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
119,'福建省','莆田市',350300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
120,'福建省','三明市',350400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
121,'福建省','泉州市',350500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
122,'福建省','漳州市',350600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
123,'福建省','南平市',350700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
124,'福建省','龙岩市',350800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
125,'福建省','宁德市',350900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
126,'江西省','南昌市',360100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
127,'江西省','景德镇市',360200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
128,'江西省','萍乡市',360300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
129,'江西省','九江市',360400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
130,'江西省','新余市',360500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
131,'江西省','鹰潭市',360600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
132,'江西省','赣州市',360700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
133,'江西省','吉安市',360800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
134,'江西省','宜春市',360900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
135,'江西省','抚州市',361000);
INSERT INTO ch_cities (id,province,city,code) VALUES (
136,'江西省','上饶市',361100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
137,'山东省','济南市',370100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
138,'山东省','青岛市',370200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
139,'山东省','淄博市',370300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
140,'山东省','枣庄市',370400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
141,'山东省','滕州市',370481);
INSERT INTO ch_cities (id,province,city,code) VALUES (
142,'山东省','东营市',370500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
143,'山东省','烟台市',370600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
144,'山东省','潍坊市',370700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
145,'山东省','济宁市',370800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
146,'山东省','泰安市',370900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
147,'山东省','威海市',371000);
INSERT INTO ch_cities (id,province,city,code) VALUES (
148,'山东省','日照市',371100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
149,'山东省','莱芜市',371200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
150,'山东省','临沂市',371300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
151,'山东省','德州市',371400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
152,'山东省','聊城市',371500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
153,'山东省','滨州市',371600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
154,'山东省','菏泽市',371700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
155,'河南省','郑州市',410100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
156,'河南省','开封市',410200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
157,'河南省','洛阳市',410300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
158,'河南省','平顶山市',410400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
159,'河南省','安阳市',410500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
160,'河南省','鹤壁市',410600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
161,'河南省','新乡市',410700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
162,'河南省','焦作市',410800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
163,'河南省','濮阳市',410900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
164,'河南省','许昌市',411000);
INSERT INTO ch_cities (id,province,city,code) VALUES (
165,'河南省','漯河市',411100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
166,'河南省','三门峡市',411200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
167,'河南省','南阳市',411300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
168,'河南省','商丘市',411400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
169,'河南省','信阳市',411500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
170,'河南省','周口市',411600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
171,'河南省','驻马店市',411700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
172,'河南省','济源市',419001);
INSERT INTO ch_cities (id,province,city,code) VALUES (
173,'湖北省','武汉市',420100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
174,'湖北省','黄石市',420200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
175,'湖北省','十堰市',420300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
176,'湖北省','宜昌市',420500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
177,'湖北省','襄阳市',420600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
178,'湖北省','鄂州市',420700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
179,'湖北省','荆门市',420800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
180,'湖北省','孝感市',420900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
181,'湖北省','荆州市',421000);
INSERT INTO ch_cities (id,province,city,code) VALUES (
182,'湖北省','黄冈市',421100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
183,'湖北省','咸宁市',421200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
184,'湖北省','随州市',421300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
185,'湖北省','恩施土家族苗族自治州',422800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
186,'湖北省','潜江市',429005);
INSERT INTO ch_cities (id,province,city,code) VALUES (
187,'湖南省','长沙市',430100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
188,'湖南省','株洲市',430200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
189,'湖南省','湘潭市',430300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
190,'湖南省','衡阳市',430400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
191,'湖南省','邵阳市',430500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
192,'湖南省','岳阳市',430600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
193,'湖南省','常德市',430700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
194,'湖南省','张家界市',430800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
195,'湖南省','益阳市',430900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
196,'湖南省','郴州市',431000);
INSERT INTO ch_cities (id,province,city,code) VALUES (
197,'湖南省','永州市',431100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
198,'湖南省','怀化市',431200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
199,'湖南省','娄底市',431300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
200,'湖南省','湘西土家族苗族自治州',433100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
201,'广东省','广州市',440100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
202,'广东省','韶关市',440200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
203,'广东省','深圳市',440300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
204,'广东省','珠海市',440400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
205,'广东省','汕头市',440500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
206,'广东省','佛山市',440600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
207,'广东省','江门市',440700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
208,'广东省','湛江市',440800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
209,'广东省','茂名市',440900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
210,'广东省','肇庆市',441200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
211,'广东省','惠州市',441300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
212,'广东省','梅州市',441400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
213,'广东省','汕尾市',441500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
214,'广东省','河源市',441600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
215,'广东省','阳江市',441700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
216,'广东省','清远市',441800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
217,'广东省','东莞市',441900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
218,'广东省','中山市',442000);
INSERT INTO ch_cities (id,province,city,code) VALUES (
219,'广东省','潮州市',445100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
220,'广东省','揭阳市',445200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
221,'广东省','云浮市',445300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
222,'广西壮族自治区','南宁市',450100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
223,'广西壮族自治区','柳州市',450200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
224,'广西壮族自治区','桂林市',450300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
225,'广西壮族自治区','梧州市',450400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
226,'广西壮族自治区','北海市',450500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
227,'广西壮族自治区','防城港市',450600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
228,'广西壮族自治区','钦州市',450700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
229,'广西壮族自治区','贵港市',450800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
230,'广西壮族自治区','玉林市',450900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
231,'广西壮族自治区','百色市',451000);
INSERT INTO ch_cities (id,province,city,code) VALUES (
232,'广西壮族自治区','贺州市',451100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
233,'广西壮族自治区','河池市',451200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
234,'广西壮族自治区','来宾市',451300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
235,'广西壮族自治区','崇左市',451400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
236,'海南省','海口市',460100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
237,'海南省','三亚市',460200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
238,'海南省','儋州市',460400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
239,'重庆市','重庆市',500100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
240,'四川省','成都市',510100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
241,'四川省','自贡市',510300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
242,'四川省','攀枝花市',510400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
243,'四川省','泸州市',510500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
244,'四川省','德阳市',510600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
245,'四川省','绵阳市',510700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
246,'四川省','广元市',510800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
247,'四川省','遂宁市',510900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
248,'四川省','内江市',511000);
INSERT INTO ch_cities (id,province,city,code) VALUES (
249,'四川省','乐山市',511100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
250,'四川省','南充市',511300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
251,'四川省','眉山市',511400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
252,'四川省','宜宾市',511500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
253,'四川省','广安市',511600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
254,'四川省','达州市',511700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
255,'四川省','雅安市',511800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
256,'四川省','巴中市',511900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
257,'四川省','资阳市',512000);
INSERT INTO ch_cities (id,province,city,code) VALUES (
258,'四川省','阿坝藏族羌族自治州',513200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
259,'四川省','甘孜藏族自治州',513300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
260,'四川省','凉山彝族自治州',513400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
261,'贵州省','贵阳市',520100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
262,'贵州省','六盘水市',520200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
263,'贵州省','遵义市',520300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
264,'贵州省','安顺市',520400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
265,'贵州省','毕节市',520500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
266,'贵州省','铜仁市',520600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
267,'贵州省','黔西南布依族苗族自治州',522300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
268,'贵州省','黔东南苗族侗族自治州',522600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
269,'贵州省','黔南布依族苗族自治州',522700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
270,'云南省','昆明市',530100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
271,'云南省','曲靖市',530300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
272,'云南省','玉溪市',530400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
273,'云南省','保山市',530500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
274,'云南省','昭通市',530600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
275,'云南省','丽江市',530700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
276,'云南省','普洱市',530800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
277,'云南省','临沧市',530900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
278,'云南省','楚雄彝族自治州',532300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
279,'云南省','红河哈尼族彝族自治州',532500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
280,'云南省','文山壮族苗族自治州',532600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
281,'云南省','西双版纳傣族自治州',532800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
282,'云南省','大理白族自治州',532900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
283,'云南省','德宏傣族景颇族自治州',533100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
284,'云南省','怒江傈僳族自治州',533300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
285,'云南省','迪庆藏族自治州',533400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
286,'西藏自治区','拉萨市',540100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
287,'西藏自治区','日喀则市',540200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
288,'陕西省','西安市',610100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
289,'陕西省','铜川市',610200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
290,'陕西省','宝鸡市',610300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
291,'陕西省','咸阳市',610400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
292,'陕西省','渭南市',610500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
293,'陕西省','延安市',610600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
294,'陕西省','汉中市',610700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
295,'陕西省','榆林市',610800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
296,'陕西省','安康市',610900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
297,'陕西省','商洛市',611000);
INSERT INTO ch_cities (id,province,city,code) VALUES (
298,'甘肃省','兰州市',620100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
299,'甘肃省','嘉峪关市',620200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
300,'甘肃省','金昌市',620300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
301,'甘肃省','白银市',620400);
INSERT INTO ch_cities (id,province,city,code) VALUES (
302,'甘肃省','天水市',620500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
303,'甘肃省','武威市',620600);
INSERT INTO ch_cities (id,province,city,code) VALUES (
304,'甘肃省','张掖市',620700);
INSERT INTO ch_cities (id,province,city,code) VALUES (
305,'甘肃省','平凉市',620800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
306,'甘肃省','酒泉市',620900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
307,'甘肃省','庆阳市',621000);
INSERT INTO ch_cities (id,province,city,code) VALUES (
308,'甘肃省','定西市',621100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
309,'甘肃省','陇南市',621200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
310,'甘肃省','临夏回族自治州',622900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
311,'甘肃省','甘南藏族自治州',623000);
INSERT INTO ch_cities (id,province,city,code) VALUES (
312,'青海省','西宁市',630100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
313,'青海省','海东市',630200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
314,'青海省','海西蒙古族藏族自治州',632800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
315,'宁夏回族自治区','银川市',640100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
316,'宁夏回族自治区','石嘴山市',640200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
317,'宁夏回族自治区','吴忠市',640300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
318,'新疆维吾尔自治区','乌鲁木齐市',650100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
319,'新疆维吾尔自治区','克拉玛依市',650200);
INSERT INTO ch_cities (id,province,city,code) VALUES (
320,'新疆维吾尔自治区','哈密市',650500);
INSERT INTO ch_cities (id,province,city,code) VALUES (
321,'新疆维吾尔自治区','昌吉回族自治州',652300);
INSERT INTO ch_cities (id,province,city,code) VALUES (
322,'新疆维吾尔自治区','巴音郭楞蒙古自治州',652800);
INSERT INTO ch_cities (id,province,city,code) VALUES (
323,'新疆维吾尔自治区','阿克苏地区',652900);
INSERT INTO ch_cities (id,province,city,code) VALUES (
324,'新疆维吾尔自治区','喀什地区',653100);
INSERT INTO ch_cities (id,province,city,code) VALUES (
325,'新疆维吾尔自治区','伊犁哈萨克自治州',654000);
-62
View File
@@ -1,62 +0,0 @@
INSERT INTO ch_provinces (id,province) VALUES (
1,'北京市');
INSERT INTO ch_provinces (id,province) VALUES (
2,'天津市');
INSERT INTO ch_provinces (id,province) VALUES (
3,'河北省');
INSERT INTO ch_provinces (id,province) VALUES (
4,'山西省');
INSERT INTO ch_provinces (id,province) VALUES (
5,'内蒙古自治区');
INSERT INTO ch_provinces (id,province) VALUES (
6,'辽宁省');
INSERT INTO ch_provinces (id,province) VALUES (
7,'吉林省');
INSERT INTO ch_provinces (id,province) VALUES (
8,'黑龙江省');
INSERT INTO ch_provinces (id,province) VALUES (
9,'上海市');
INSERT INTO ch_provinces (id,province) VALUES (
10,'江苏省');
INSERT INTO ch_provinces (id,province) VALUES (
11,'浙江省');
INSERT INTO ch_provinces (id,province) VALUES (
12,'安徽省');
INSERT INTO ch_provinces (id,province) VALUES (
13,'福建省');
INSERT INTO ch_provinces (id,province) VALUES (
14,'江西省');
INSERT INTO ch_provinces (id,province) VALUES (
15,'山东省');
INSERT INTO ch_provinces (id,province) VALUES (
16,'河南省');
INSERT INTO ch_provinces (id,province) VALUES (
17,'湖北省');
INSERT INTO ch_provinces (id,province) VALUES (
18,'湖南省');
INSERT INTO ch_provinces (id,province) VALUES (
19,'广东省');
INSERT INTO ch_provinces (id,province) VALUES (
20,'广西壮族自治区');
INSERT INTO ch_provinces (id,province) VALUES (
21,'海南省');
INSERT INTO ch_provinces (id,province) VALUES (
22,'重庆市');
INSERT INTO ch_provinces (id,province) VALUES (
23,'四川省');
INSERT INTO ch_provinces (id,province) VALUES (
24,'贵州省');
INSERT INTO ch_provinces (id,province) VALUES (
25,'云南省');
INSERT INTO ch_provinces (id,province) VALUES (
26,'西藏自治区');
INSERT INTO ch_provinces (id,province) VALUES (
27,'陕西省');
INSERT INTO ch_provinces (id,province) VALUES (
28,'甘肃省');
INSERT INTO ch_provinces (id,province) VALUES (
29,'青海省');
INSERT INTO ch_provinces (id,province) VALUES (
30,'宁夏回族自治区');
INSERT INTO ch_provinces (id,province) VALUES (
31,'新疆维吾尔自治区');
File diff suppressed because it is too large Load Diff
-8
View File
@@ -1,8 +0,0 @@
INSERT INTO exa_customers (id,created_at,updated_at,deleted_at,customer_name,customer_phone_data,sys_user_id,sys_user_authority_id) VALUES (
1,1582624908000,1586492969000,NULL,'测试客户','1761111111',10,'888');
INSERT INTO exa_customers (id,created_at,updated_at,deleted_at,customer_name,customer_phone_data,sys_user_id,sys_user_authority_id) VALUES (
2,1586492753000,1586492753000,1586497436000,'test','123123123',10,'888');
INSERT INTO exa_customers (id,created_at,updated_at,deleted_at,customer_name,customer_phone_data,sys_user_id,sys_user_authority_id) VALUES (
3,1586497452000,1586497452000,1586497453000,'123123','123123',10,'888');
INSERT INTO exa_customers (id,created_at,updated_at,deleted_at,customer_name,customer_phone_data,sys_user_id,sys_user_authority_id) VALUES (
4,1586497630000,1586497630000,1586497632000,'22222222','222222222222222',10,'888');
@@ -1,10 +0,0 @@
INSERT INTO exa_file_upload_and_downloads (id,created_at,updated_at,deleted_at,name,url,tag,"key") VALUES (
7,1572101192000,1572101192000,NULL,'logo.png','http://qmplusimg.henrongyi.top/1572101191logo.png','png','1572101191logo.png');
INSERT INTO exa_file_upload_and_downloads (id,created_at,updated_at,deleted_at,name,url,tag,"key") VALUES (
10,1572102644000,1572102644000,NULL,'logo.png','http://qmplusimg.henrongyi.top/1572102643logo.png','png','1572102643logo.png');
INSERT INTO exa_file_upload_and_downloads (id,created_at,updated_at,deleted_at,name,url,tag,"key") VALUES (
12,1572102848000,1572102848000,NULL,'logo.png','http://qmplusimg.henrongyi.top/1572102846logo.png','png','1572102846logo.png');
INSERT INTO exa_file_upload_and_downloads (id,created_at,updated_at,deleted_at,name,url,tag,"key") VALUES (
13,1572103097000,1572103097000,NULL,'logo.png','http://qmplusimg.henrongyi.top/1572103096logo.png','png','1572103096logo.png');
INSERT INTO exa_file_upload_and_downloads (id,created_at,updated_at,deleted_at,name,url,tag,"key") VALUES (
15,1576391460000,1576391460000,NULL,'logo.png','http://qmplusimg.henrongyi.top/1576391451logo.png','png','1576391451logo.png');
View File
-72
View File
@@ -1,72 +0,0 @@
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
3,1577528945000,1577528945000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4MTMzNzM2LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1Nzc1Mjc5MzZ9.T7ikGw-lgAAQlfMne7zPIF-PlfQMg37uBCYJ24Y_B38');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
4,1577529062000,1577529062000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4MTMzODUzLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1Nzc1MjgwNTN9.tDzUm4KNFeJCErNfZGfuF2tcuolga2f_2dE0nTl_UZU');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
5,1577529085000,1577529085000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4MTMzODcwLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1Nzc1MjgwNzB9.mspXy9sqQO_5PusPReLalodo_ybWRKxb3Ownf2r2HxE');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
6,1577686810000,1577686810000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4MjkxNTc2LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1Nzc2ODU3NzZ9.AR2KYShboFKsHTjwohxEkA3lytttfZqRH849sl2fNdw');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
7,1577686874000,1577686874000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4MjkxNjE2LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1Nzc2ODU4MTZ9.h8zbDVHM_QbBI-ejGXeQpw0S9oYHJyP4U-TwsVFus9Q');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
8,1577686917000,1577686917000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4MjkxNjgxLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1Nzc2ODU4ODF9.CSjolDGVpU0g7YG6TaPAlWAMdhtvnBhAi-XYYWZ6RLo');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
9,1577687101000,1577687101000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4MjkxODIyLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1Nzc2ODYwMjJ9.Y_s22Vh5J2ah6Kh1nZQQ8XIQspbT4I7tzc_YJqWrRWM');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
10,1577687366000,1577687366000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4MjkyMTU0LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1Nzc2ODYzNTR9.4HJdx-sfYE5TUUefdwi3yZ6dY_jG7WwEC_55WuGawY8');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
11,1577688223000,1577688223000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4MjkyMTcwLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1Nzc2ODYzNzB9.YEhupQVwjMVBB2eAcAoGG-vJczoxuUyn6KR-tDWU86I');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
12,1577688913000,1577688913000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4MjkzMDI3LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1Nzc2ODcyMjd9.r_sE_Z31cFdS2nCf3iyQjuiZe0Z3HPR07wKBGlUHsnk');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
13,1577689111000,1577689111000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4MjkzNzY2LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1Nzc2ODc5NjZ9.dYFlmyIKQZjzTCKu56wCmxXiW6zOayN_YgygCcvCyLk');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
14,1577689118000,1577689118000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4MjkzOTEwLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1Nzc2ODgxMTB9.pPmzsHU4UceZuPFT_G-SDdxe6FD3MuL47HkovpI-_0c');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
15,1577689138000,1577689138000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4MjkzOTE4LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1Nzc2ODgxMTh9.irf98R0belbXtb8x9SxsvuhiYsbHMPbHbFDxaaH0z6Q');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
16,1578299551000,1578299551000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTAzMjk5LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTc0OTl9.jgLfjvek7sQyuZ2TABQvLOyu_ifNw_KYzfY3VTLL4fw');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
17,1578299588000,1578299588000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA0MzU4LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTg1NTh9.89r6xHZUBDjfmNpmF02RjQXYTBGUiJvOEDP8pydNt-A');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
18,1578299598000,1578299598000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA0MzkyLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTg1OTJ9.6Yv9ZYhN-TH9H4SoZEAkjevKVX0vLHL1lVQGFpfBr2U');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
19,1578299766000,1578299766000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA0NDA5LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTg2MDl9._9zRRK76XH_KgrW1X9P5GTLW9dwfIixB4QUsC7M3RHA');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
20,1578300246000,1578300246000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA0NTcxLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTg3NzF9.5ki0TZooCorK81xWpYa-OO3RR-Bpp5am_uNCNPh4250');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
21,1578300350000,1578300350000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA1MDUwLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTkyNTB9.A0n5faE0X0TyRb_1RvAQBLooY-peapPTD0LnJD03Ul0');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
22,1578300384000,1578300384000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA1MTU0LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTkzNTR9.VtqTOJ-MQY2K3w4tM7HgT0z73CEOd3CDqmYqKCjXxnc');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
23,1578300440000,1578300440000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA1MTg3LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTkzODd9.fwL1QakF30SHSaGDkPo3weIg0l7kiAGwNq_fKsFxquc');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
24,1578300477000,1578300477000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA1MjQ0LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTk0NDR9.VoKdA0-brmUlQ5bYufIdMWrS-cCQ2ARm7_jeVtfvCpc');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
25,1578300548000,1578300548000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA1Mjg1LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTk0ODV9.a8-zmyIlJJGdonhXAzNvNH9C-nMa-Voq4bhTbiVKJzE');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
26,1578300572000,1578300572000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA1MzUyLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTk1NTJ9.l4e3rjtrDgRsqnQwizJ-ZXVUVM8ywSJcNJkkEVYbdzU');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
27,1578300598000,1578300598000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA1Mzc3LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTk1Nzd9.mXUPYvmXbntrdywpBNM0j9sP991cwfhc9b0KvUM4dG4');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
28,1578300656000,1578300656000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA1NDExLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTk2MTF9.Z21e8nWHKV5XvYg61CZCz3nMK25m_FmlxncxGMpMS0k');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
29,1578300723000,1578300723000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA1NDY0LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTk2NjR9.qzptIyCcL_SPm6TGwXML8Rih3qYqj9GLUpWzTpSPPuI');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
30,1578300756000,1578300756000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA1NTI3LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTk3Mjd9.D9e8qbx44CLX0ZInwNlIqTGS_sSE069TRIDkQAk7tVY');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
31,1578300875000,1578300875000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA1NTY1LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTk3NjV9.D4EZmVAJ96kxcyIfWkT_LA81t1JCuQZcYmQkkoNhtPo');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
32,1578300940000,1578300940000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA1NjgzLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTk4ODN9.SJL2fFMbe5VL2YWBzMlrhxbBIJhIHTUeodkEpgH1Xgo');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
33,1578301048000,1578301048000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA1NzU4LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTk5NTh9.6y12UkOeW7vz7gGTcYaN3Y-2Ut2QmjgU9WEuy_pneGM');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
34,1578301142000,1578301142000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA1ODU1LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgzMDAwNTV9.G0q9X7Ld3cN_BO-K219b7tFAHgtpiAwqLPoxVNKsEl8');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
35,1578301166000,1578301166000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA1OTQ2LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgzMDAxNDZ9.cmBgWiztsnh7zF3OUNIDQKv8wzGJF7fllUv-4LlYxu8');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
36,1584773174000,1584773174000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTg1Mzc3ODY3LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1ODQ3NzIwNjd9.DLhWhD1FdcWLyFLcXQynKJnenbVHrSiKhlDGFRzgo5k');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
37,1585635875000,1585635875000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTg2MTM4MTA4LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1ODU1MzIzMDh9.Ro2F2dZLfOk2Z_OPRbweOuCpchr6HlHfQIF5qjfc8y4');
INSERT INTO jwt_blacklists (id,created_at,updated_at,deleted_at,jwt) VALUES (
38,1585728477000,1585728477000,NULL,'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTg2MjQwNzQyLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1ODU2MzQ5NDJ9.9qaOFu7D5cq4vxTfLi4pyO_JGcKjVAEJIcoStJWJlYg');
-82
View File
@@ -1,82 +0,0 @@
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
1,1569641029000,1569661576000,NULL,NULL,'/base/login','用户登录','base','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
2,1569641566000,1569661571000,NULL,NULL,'/base/register','用户注册','base','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
3,1569641621000,1576054301000,NULL,NULL,'/api/createApi','创建api','api','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
4,1569650944000,1569661559000,NULL,NULL,'/api/getApiList','获取api列表','api','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
5,1569651350000,1569661553000,NULL,NULL,'/api/getApiById','获取api详细信息','api','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
7,1569651566000,1569661544000,NULL,NULL,'/api/deleteApi','删除Api','api','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
8,1569651588000,1569661539000,NULL,NULL,'/api/updateApi','更新Api','api','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
10,1569827138000,1569827138000,NULL,NULL,'/api/getAllApis','获取所有api','api','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
11,1569828189000,1569828189000,NULL,NULL,'/authority/createAuthority','创建角色','authority','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
12,1569828213000,1569828213000,NULL,NULL,'/authority/deleteAuthority','删除角色','authority','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
13,1569828237000,1569828237000,NULL,NULL,'/authority/getAuthorityList','获取角色列表','authority','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
14,1569828260000,1569828260000,NULL,NULL,'/menu/getMenu','获取菜单树','menu','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
15,1569828290000,1569828290000,NULL,NULL,'/menu/getMenuList','分页获取基础menu列表','menu','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
16,1569828307000,1569828307000,NULL,NULL,'/menu/addBaseMenu','新增菜单','menu','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
17,1569828325000,1569828325000,NULL,NULL,'/menu/getBaseMenuTree','获取用户动态路由','menu','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
18,1569828353000,1569828353000,NULL,NULL,'/menu/addMenuAuthority','增加menu和角色关联关系','menu','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
19,1569828380000,1569828380000,NULL,NULL,'/menu/getMenuAuthority','获取指定角色menu','menu','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
20,1569828403000,1569828403000,NULL,NULL,'/menu/deleteBaseMenu','删除菜单','menu','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
21,1569828485000,1569828485000,NULL,NULL,'/menu/updateBaseMenu','更新菜单','menu','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
22,1569828501000,1569828501000,NULL,NULL,'/menu/getBaseMenuById','根据id获取菜单','menu','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
23,1569828559000,1569828559000,NULL,NULL,'/user/changePassword','修改密码','user','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
24,1569828573000,1569828573000,NULL,NULL,'/user/uploadHeaderImg','上传头像','user','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
25,1569828600000,1569828600000,NULL,NULL,'/user/getInfoList','分页获取用户列表','user','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
28,1570605317000,1570605427000,NULL,NULL,'/user/getUserList','获取用户列表','user','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
29,1570633300000,1570633300000,NULL,NULL,'/user/setUserAuthority','修改用户角色','user','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
30,1572092078000,1572092078000,NULL,NULL,'/fileUploadAndDownload/upload','文件上传示例','fileUploadAndDownload','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
31,1572092099000,1572092099000,NULL,NULL,'/fileUploadAndDownload/getFileList','获取上传文件列表','fileUploadAndDownload','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
32,1576128527000,1576128527000,NULL,NULL,'/casbin/updateCasbin','更改角色api权限','casbin','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
33,1576128539000,1576128539000,NULL,NULL,'/casbin/getPolicyPathByAuthorityId','获取权限列表','casbin','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
34,1576141335000,1576141335000,NULL,NULL,'/fileUploadAndDownload/deleteFile','删除文件','fileUploadAndDownload','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
35,1577528287000,1577528287000,NULL,NULL,'/jwt/jsonInBlacklist','jwt加入黑名单','jwt','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
36,1578304596000,1578304596000,NULL,NULL,'/authority/setDataAuthority','设置角色资源权限','authority','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
37,1578895445000,1578895445000,NULL,NULL,'/system/getSystemConfig','获取配置文件内容','system','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
38,1578898926000,1578898926000,NULL,NULL,'/system/setSystemConfig','设置配置文件内容','system','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
39,1582615959000,1582615959000,NULL,NULL,'/customer/customer','创建客户','customer','POST');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
40,1582615971000,1582616096000,NULL,NULL,'/customer/customer','更新客户','customer','PUT');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
41,1582616037000,1582616037000,NULL,NULL,'/customer/customer','删除客户','customer','DELETE');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
42,1582616208000,1582616236000,NULL,NULL,'/customer/customer','获取单一客户','customer','GET');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
43,1582616226000,1582616226000,NULL,NULL,'/customer/customerList','获取客户列表','customer','GET');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
44,1583995014000,1583996210000,NULL,NULL,'/casbin/casbinTest/:pathParam','RESTFUL模式测试','casbin','GET');
INSERT INTO sys_apis (id,created_at,updated_at,deleted_at,authority_id,"path",description,api_group,"method") VALUES (
45,1585494088000,1585494088000,NULL,NULL,'/autoCode/createTemp','自动化代码','autoCode','POST');
-6
View File
@@ -1,6 +0,0 @@
INSERT INTO sys_authorities (authority_id,authority_name,parent_id,created_at,updated_at,deleted_at) VALUES (
'888','普通用户','0',1585971896000,NULL,NULL);
INSERT INTO sys_authorities (authority_id,authority_name,parent_id,created_at,updated_at,deleted_at) VALUES (
'8881','普通用户子角色','888',1585971896000,NULL,NULL);
INSERT INTO sys_authorities (authority_id,authority_name,parent_id,created_at,updated_at,deleted_at) VALUES (
'9528','测试角色','0',1585971896000,NULL,NULL);
-94
View File
@@ -1,94 +0,0 @@
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'888',1);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'888',2);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'888',3);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'888',4);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'888',5);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'888',6);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'888',17);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'888',18);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'888',19);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'888',20);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'888',21);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'888',22);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'888',23);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'888',26);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'888',33);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'888',34);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'888',38);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'888',40);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'888',41);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'888',42);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'8881',1);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'8881',2);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'8881',18);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'8881',38);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'8881',40);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'8881',41);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'8881',42);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'9528',1);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'9528',2);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'9528',3);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'9528',4);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'9528',5);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'9528',6);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'9528',17);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'9528',18);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'9528',19);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'9528',20);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'9528',21);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'9528',22);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'9528',23);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'9528',26);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'9528',33);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'9528',34);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'9528',38);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'9528',40);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'9528',41);
INSERT INTO sys_authority_menus (sys_authority_authority_id,sys_base_menu_id) VALUES (
'9528',42);
-40
View File
@@ -1,40 +0,0 @@
INSERT INTO sys_base_menus (id,created_at,updated_at,deleted_at,menu_level,parent_id,"path",name,hidden,component,title,icon,nick_name,sort) VALUES (
1,1568901918000,1586267284000,NULL,0,0,'dashboard','dashboard',0,'view/dashboard/index.vue','仪表盘','setting','仪表盘',1);
INSERT INTO sys_base_menus (id,created_at,updated_at,deleted_at,menu_level,parent_id,"path",name,hidden,component,title,icon,nick_name,sort) VALUES (
2,1568901977000,1585312438000,NULL,0,0,'test','test',0,'view/test/index.vue','测试菜单','info','测试菜单',2);
INSERT INTO sys_base_menus (id,created_at,updated_at,deleted_at,menu_level,parent_id,"path",name,hidden,component,title,icon,nick_name,sort) VALUES (
3,1568901998000,1576140691000,NULL,0,0,'admin','superAdmin',0,'view/superAdmin/index.vue','超级管理员','user-solid','超级管理员',3);
INSERT INTO sys_base_menus (id,created_at,updated_at,deleted_at,menu_level,parent_id,"path",name,hidden,component,title,icon,nick_name,sort) VALUES (
4,1568902313000,1568902313000,NULL,0,3,'authority','authority',0,'view/superAdmin/authority/authority.vue','角色管理','s-custom','角色管理',1);
INSERT INTO sys_base_menus (id,created_at,updated_at,deleted_at,menu_level,parent_id,"path",name,hidden,component,title,icon,nick_name,sort) VALUES (
5,1568902398000,1576141040000,NULL,0,3,'menu','menu',0,'view/superAdmin/menu/menu.vue','菜单管理','s-order','菜单管理',2);
INSERT INTO sys_base_menus (id,created_at,updated_at,deleted_at,menu_level,parent_id,"path",name,hidden,component,title,icon,nick_name,sort) VALUES (
6,1568902416000,1576141050000,NULL,0,3,'api','api',0,'view/superAdmin/api/api.vue','api管理','s-platform','api管理',3);
INSERT INTO sys_base_menus (id,created_at,updated_at,deleted_at,menu_level,parent_id,"path",name,hidden,component,title,icon,nick_name,sort) VALUES (
17,1570605149000,1576141045000,NULL,0,3,'user','user',0,'view/superAdmin/user/user.vue','用户管理','coordinate','用户管理',4);
INSERT INTO sys_base_menus (id,created_at,updated_at,deleted_at,menu_level,parent_id,"path",name,hidden,component,title,icon,nick_name,sort) VALUES (
18,1571149642000,1576140693000,NULL,0,0,'person','person',1,'view/person/person.vue','个人信息','user-solid','个人信息',4);
INSERT INTO sys_base_menus (id,created_at,updated_at,deleted_at,menu_level,parent_id,"path",name,hidden,component,title,icon,nick_name,sort) VALUES (
19,1571541282000,1585489158000,NULL,0,0,'example','example',0,'view/example/index.vue','示例文件','s-management','示例文件',6);
INSERT INTO sys_base_menus (id,created_at,updated_at,deleted_at,menu_level,parent_id,"path",name,hidden,component,title,icon,nick_name,sort) VALUES (
20,1571541491000,1571541491000,NULL,0,19,'table','table',0,'view/example/table/table.vue','表格示例','s-order','表格示例',1);
INSERT INTO sys_base_menus (id,created_at,updated_at,deleted_at,menu_level,parent_id,"path",name,hidden,component,title,icon,nick_name,sort) VALUES (
21,1571541592000,1576141095000,NULL,0,19,'form','form',0,'view/example/form/form.vue','表单示例','document','表单示例',2);
INSERT INTO sys_base_menus (id,created_at,updated_at,deleted_at,menu_level,parent_id,"path",name,hidden,component,title,icon,nick_name,sort) VALUES (
22,1571541739000,1576141100000,NULL,0,19,'rte','rte',0,'view/example/rte/rte.vue','富文本编辑器','reading','富文本编辑器',3);
INSERT INTO sys_base_menus (id,created_at,updated_at,deleted_at,menu_level,parent_id,"path",name,hidden,component,title,icon,nick_name,sort) VALUES (
23,1571541819000,1576141103000,NULL,0,19,'excel','excel',0,'view/example/excel/excel.vue','excel导入导出','s-marketing','excel导入导出',4);
INSERT INTO sys_base_menus (id,created_at,updated_at,deleted_at,menu_level,parent_id,"path",name,hidden,component,title,icon,nick_name,sort) VALUES (
26,1571542022000,1576141107000,NULL,0,19,'upload','upload',0,'view/example/upload/upload.vue','上传下载','upload','上传下载',5);
INSERT INTO sys_base_menus (id,created_at,updated_at,deleted_at,menu_level,parent_id,"path",name,hidden,component,title,icon,nick_name,sort) VALUES (
33,1581927647000,1582544740000,NULL,0,19,'breakpoint','breakpoint',0,'view/example/breakpoint/breakpoint.vue','断点续传','upload','断点续传',6);
INSERT INTO sys_base_menus (id,created_at,updated_at,deleted_at,menu_level,parent_id,"path",name,hidden,component,title,icon,nick_name,sort) VALUES (
34,1582544917000,1585311002000,NULL,0,19,'customer','customer',0,'view/example/customer/customer.vue','客户列表(资源示例)','s-custom','客户列表(资源示例)',7);
INSERT INTO sys_base_menus (id,created_at,updated_at,deleted_at,menu_level,parent_id,"path",name,hidden,component,title,icon,nick_name,sort) VALUES (
38,1585488663000,1585488663000,NULL,0,0,'systemTools','systemTools',0,'view/systemTools/index.vue','系统工具','s-cooperation','系统工具',5);
INSERT INTO sys_base_menus (id,created_at,updated_at,deleted_at,menu_level,parent_id,"path",name,hidden,component,title,icon,nick_name,sort) VALUES (
40,1585488910000,1585488910000,NULL,0,38,'autoCode','autoCode',0,'view/systemTools/autoCode/index.vue','代码生成器','cpu','代码生成器',1);
INSERT INTO sys_base_menus (id,created_at,updated_at,deleted_at,menu_level,parent_id,"path",name,hidden,component,title,icon,nick_name,sort) VALUES (
41,1585488986000,1585488986000,NULL,0,38,'formCreate','formCreate',0,'view/systemTools/formCreate/index.vue','表单生成器','magic-stick','表单生成器',2);
INSERT INTO sys_base_menus (id,created_at,updated_at,deleted_at,menu_level,parent_id,"path",name,hidden,component,title,icon,nick_name,sort) VALUES (
42,1585808376000,1585808416000,NULL,0,38,'system','system',0,'view/systemTools/system/system.vue','系统配置','s-operation','系统配置',3);
@@ -1,10 +0,0 @@
INSERT INTO sys_data_authority_id (sys_authority_authority_id,data_authority_id) VALUES (
'888','888');
INSERT INTO sys_data_authority_id (sys_authority_authority_id,data_authority_id) VALUES (
'888','8881');
INSERT INTO sys_data_authority_id (sys_authority_authority_id,data_authority_id) VALUES (
'888','9528');
INSERT INTO sys_data_authority_id (sys_authority_authority_id,data_authority_id) VALUES (
'9528','8881');
INSERT INTO sys_data_authority_id (sys_authority_authority_id,data_authority_id) VALUES (
'9528','9528');
-106
View File
@@ -1,106 +0,0 @@
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
231,1568901918000,1576140685000,NULL,0,999,'dashbord','dashbord',0,'view/dashbord/index.vue','仪表盘','setting',0,'1','仪表盘','1');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
232,1568901977000,1585312438000,NULL,0,999,'test','test',0,'view/test/index.vue','测试菜单','info',0,'2','测试菜单','2');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
451,1568901918000,1576140685000,NULL,0,8881,'dashbord','dashbord',0,'view/dashbord/index.vue','仪表盘','setting',0,'1','仪表盘','1');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
452,1568901998000,1576140691000,NULL,0,8881,'admin','superAdmin',0,'view/superAdmin/index.vue','超级管理员','user-solid',0,'3','超级管理员','3');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
453,1568902313000,1568902313000,NULL,0,8881,'authority','authority',0,'view/superAdmin/authority/authority.vue','角色管理','s-custom',3,'4','角色管理','1');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
454,1568902398000,1576141040000,NULL,0,8881,'menu','menu',0,'view/superAdmin/menu/menu.vue','菜单管理','s-order',3,'5','菜单管理','2');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
455,1568902416000,1576141050000,NULL,0,8881,'api','api',0,'view/superAdmin/api/api.vue','api管理','s-platform',3,'6','api管理','3');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
456,1570605149000,1576141045000,NULL,0,8881,'user','user',0,'view/superAdmin/user/user.vue','用户管理','coordinate',3,'17','用户管理','4');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
458,1571149642000,1576140693000,NULL,0,8881,'person','person',1,'view/person/person.vue','个人信息','user-solid',0,'18','个人信息','4');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
459,1571541282000,1585489158000,NULL,0,8881,'example','example',0,'view/example/index.vue','示例文件','s-management',0,'19','示例文件','6');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
460,1571541491000,1571541491000,NULL,0,8881,'table','table',0,'view/example/table/table.vue','表格示例','s-order',19,'20','表格示例','1');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
461,1571541592000,1576141095000,NULL,0,8881,'form','form',0,'view/example/form/form.vue','表单示例','document',19,'21','表单示例','2');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
462,1571541739000,1576141100000,NULL,0,8881,'rte','rte',0,'view/example/rte/rte.vue','富文本编辑器','reading',19,'22','富文本编辑器','3');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
463,1571541819000,1576141103000,NULL,0,8881,'excel','excel',0,'view/example/excel/excel.vue','excel导入导出','s-marketing',19,'23','excel导入导出','4');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
464,1571542022000,1576141107000,NULL,0,8881,'upload','upload',0,'view/example/upload/upload.vue','上传下载','upload',19,'26','上传下载','5');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
465,1581927647000,1582544740000,NULL,0,8881,'breakpoint','breakpoint',0,'view/example/breakpoint/breakpoint.vue','断点续传','upload',19,'33','断点续传','6');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
466,1582544917000,1585310739000,NULL,0,8881,'customer','customer',0,'view/example/customer/customer.vue','客户列表(资源示例)','s-custom',19,'34','客户列表(资源示例)','7');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
503,1568901918000,1576140685000,NULL,0,9528,'dashbord','dashbord',0,'view/dashbord/index.vue','仪表盘','setting',0,'1','仪表盘','1');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
504,1568901977000,1585312438000,NULL,0,9528,'test','test',0,'view/test/index.vue','测试菜单','info',0,'2','测试菜单','2');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
505,1568901998000,1576140691000,NULL,0,9528,'admin','superAdmin',0,'view/superAdmin/index.vue','超级管理员','user-solid',0,'3','超级管理员','3');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
506,1568902313000,1568902313000,NULL,0,9528,'authority','authority',0,'view/superAdmin/authority/authority.vue','角色管理','s-custom',3,'4','角色管理','1');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
507,1568902398000,1576141040000,NULL,0,9528,'menu','menu',0,'view/superAdmin/menu/menu.vue','菜单管理','s-order',3,'5','菜单管理','2');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
508,1568902416000,1576141050000,NULL,0,9528,'api','api',0,'view/superAdmin/api/api.vue','api管理','s-platform',3,'6','api管理','3');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
509,1570605149000,1576141045000,NULL,0,9528,'user','user',0,'view/superAdmin/user/user.vue','用户管理','coordinate',3,'17','用户管理','4');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
512,1571149642000,1576140693000,NULL,0,9528,'person','person',1,'view/person/person.vue','个人信息','user-solid',0,'18','个人信息','4');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
513,1571541282000,1585489158000,NULL,0,9528,'example','example',0,'view/example/index.vue','示例文件','s-management',0,'19','示例文件','6');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
514,1571541491000,1571541491000,NULL,0,9528,'table','table',0,'view/example/table/table.vue','表格示例','s-order',19,'20','表格示例','1');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
515,1571541592000,1576141095000,NULL,0,9528,'form','form',0,'view/example/form/form.vue','表单示例','document',19,'21','表单示例','2');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
516,1571541739000,1576141100000,NULL,0,9528,'rte','rte',0,'view/example/rte/rte.vue','富文本编辑器','reading',19,'22','富文本编辑器','3');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
517,1571541819000,1576141103000,NULL,0,9528,'excel','excel',0,'view/example/excel/excel.vue','excel导入导出','s-marketing',19,'23','excel导入导出','4');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
518,1571542022000,1576141107000,NULL,0,9528,'upload','upload',0,'view/example/upload/upload.vue','上传下载','upload',19,'26','上传下载','5');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
519,1581927647000,1582544740000,NULL,0,9528,'breakpoint','breakpoint',0,'view/example/breakpoint/breakpoint.vue','断点续传','upload',19,'33','断点续传','6');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
520,1582544917000,1585310738000,NULL,0,9528,'customer','customer',0,'view/example/customer/customer.vue','客户列表(资源示例)','s-custom',19,'34','客户列表(资源示例)','7');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
560,1568901918000,1576140685000,NULL,0,888,'dashbord','dashbord',0,'view/dashbord/index.vue','仪表盘','setting',0,'1','仪表盘','1');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
561,1568901977000,1585312438000,NULL,0,888,'test','test',0,'view/test/index.vue','测试菜单','info',0,'2','测试菜单','2');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
562,1568901998000,1576140691000,NULL,0,888,'admin','superAdmin',0,'view/superAdmin/index.vue','超级管理员','user-solid',0,'3','超级管理员','3');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
563,1568902313000,1568902313000,NULL,0,888,'authority','authority',0,'view/superAdmin/authority/authority.vue','角色管理','s-custom',3,'4','角色管理','1');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
564,1568902398000,1576141040000,NULL,0,888,'menu','menu',0,'view/superAdmin/menu/menu.vue','菜单管理','s-order',3,'5','菜单管理','2');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
565,1568902416000,1576141050000,NULL,0,888,'api','api',0,'view/superAdmin/api/api.vue','api管理','s-platform',3,'6','api管理','3');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
566,1570605149000,1576141045000,NULL,0,888,'user','user',0,'view/superAdmin/user/user.vue','用户管理','coordinate',3,'17','用户管理','4');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
567,1571149642000,1576140693000,NULL,0,888,'person','person',1,'view/person/person.vue','个人信息','user-solid',0,'18','个人信息','4');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
568,1585488663000,1585488663000,NULL,0,888,'systemTools','systemTools',0,'view/systemTools/index.vue','系统工具','s-cooperation',0,'38','系统工具','5');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
569,1585488910000,1585488910000,NULL,0,888,'autoCode','autoCode',0,'view/systemTools/autoCode/index.vue','代码生成器','cpu',38,'40','代码生成器','1');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
570,1585488986000,1585488986000,NULL,0,888,'formCreate','formCreate',0,'view/systemTools/formCreate/index.vue','表单生成器','magic-stick',38,'41','表单生成器','2');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
571,1585808376000,1585808416000,NULL,0,888,'system','system',0,'view/systemTools/system/system.vue','系统配置','s-operation',38,'42','系统配置','3');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
572,1571541282000,1585489158000,NULL,0,888,'example','example',0,'view/example/index.vue','示例文件','s-management',0,'19','示例文件','6');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
573,1571541491000,1571541491000,NULL,0,888,'table','table',0,'view/example/table/table.vue','表格示例','s-order',19,'20','表格示例','1');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
574,1571541592000,1576141095000,NULL,0,888,'form','form',0,'view/example/form/form.vue','表单示例','document',19,'21','表单示例','2');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
575,1571541739000,1576141100000,NULL,0,888,'rte','rte',0,'view/example/rte/rte.vue','富文本编辑器','reading',19,'22','富文本编辑器','3');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
576,1571541819000,1576141103000,NULL,0,888,'excel','excel',0,'view/example/excel/excel.vue','excel导入导出','s-marketing',19,'23','excel导入导出','4');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
577,1571542022000,1576141107000,NULL,0,888,'upload','upload',0,'view/example/upload/upload.vue','上传下载','upload',19,'26','上传下载','5');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
578,1581927647000,1582544740000,NULL,0,888,'breakpoint','breakpoint',0,'view/example/breakpoint/breakpoint.vue','断点续传','upload',19,'33','断点续传','6');
INSERT INTO sys_menus (id,created_at,updated_at,deleted_at,menu_level,authority_id,"path",name,hidden,component,title,icon,parent_id,menu_id,nick_name,sort) VALUES (
579,1582544917000,1585311002000,NULL,0,888,'customer','customer',0,'view/example/customer/customer.vue','客户列表(资源示例)','s-custom',19,'34','客户列表(资源示例)','7');
-4
View File
@@ -1,4 +0,0 @@
INSERT INTO sys_users (id,created_at,updated_at,deleted_at,uuid,user_name,pass_word,nick_name,header_img,authority_id,authority_name,username,password,phone_data,manager) VALUES (
10,1568366626000,1571627763000,NULL,NULL,NULL,NULL,'超级管理员','http://qmplusimg.henrongyi.top/1571627762timg.jpg',888,NULL,'admin','e10adc3949ba59abbe56e057f20f883e',NULL,NULL);
INSERT INTO sys_users (id,created_at,updated_at,deleted_at,uuid,user_name,pass_word,nick_name,header_img,authority_id,authority_name,username,password,phone_data,manager) VALUES (
11,1568366849000,1568366849000,NULL,NULL,NULL,NULL,'QMPlusUser','http://qmplusimg.henrongyi.top/1572075907logo.png',9528,NULL,'a303176530','3ec063004a6f31642261936a379fde3d',NULL,NULL);
-2
View File
@@ -1,2 +0,0 @@
INSERT INTO sys_workflows (id,created_at,updated_at,deleted_at,workflow_nick_name,workflow_name,workflow_description) VALUES (
8,1575876021000,1575876021000,NULL,'测试改版1','test','123123');
-254
View File
@@ -1,254 +0,0 @@
-- casbin_rule definition
CREATE TABLE casbin_rule(
p_type varchar(100),
v0 varchar(100),
v1 varchar(100),
v2 varchar(100),
v3 varchar(100),
v4 varchar(100),
v5 varchar(100));
-- ch_cities definition
CREATE TABLE ch_cities(
id int,
province varchar(255),
city varchar(255),
code int);
-- ch_provinces definition
CREATE TABLE ch_provinces(
id int,
province varchar(255));
-- ch_t_d_areainfo definition
CREATE TABLE ch_t_d_areainfo(
id int NOT NULL,
name varchar(48) NOT NULL,
arealevel tinyint NOT NULL,
parent_id int,
PRIMARY KEY (id)
);
-- exa_customers definition
CREATE TABLE exa_customers(
id int NOT NULL,
created_at TIMESTAMP,
updated_at TIMESTAMP,
deleted_at TIMESTAMP,
customer_name varchar(255),
customer_phone_data varchar(255),
sys_user_id int,
sys_user_authority_id varchar(255),
PRIMARY KEY (id)
);
-- exa_file_chunks definition
CREATE TABLE exa_file_chunks(
id int NOT NULL,
created_at TIMESTAMP,
updated_at TIMESTAMP,
deleted_at TIMESTAMP,
exa_file_id int,
file_chunk_path varchar(255),
file_chunk_number int,
PRIMARY KEY (id)
);
-- exa_file_upload_and_downloads definition
CREATE TABLE exa_file_upload_and_downloads(
id int NOT NULL,
created_at TIMESTAMP,
updated_at TIMESTAMP,
deleted_at TIMESTAMP,
name varchar(255),
url varchar(255),
tag varchar(255),
"key" varchar(255),
PRIMARY KEY (id)
);
-- exa_files definition
CREATE TABLE exa_files(
id int NOT NULL,
created_at TIMESTAMP,
updated_at TIMESTAMP,
deleted_at TIMESTAMP,
file_name varchar(255),
file_md5 varchar(255),
file_path varchar(255),
chunk_total int,
is_finish tinyint,
PRIMARY KEY (id)
);
-- jwt_blacklists definition
CREATE TABLE jwt_blacklists(
id int NOT NULL,
created_at TIMESTAMP,
updated_at TIMESTAMP,
deleted_at TIMESTAMP,
jwt text(65535),
PRIMARY KEY (id)
);
-- sys_apis definition
CREATE TABLE sys_apis(
id int NOT NULL,
created_at TIMESTAMP,
updated_at TIMESTAMP,
deleted_at TIMESTAMP,
authority_id int,
"path" varchar(255),
description varchar(255),
api_group varchar(255),
"method" varchar(255),
PRIMARY KEY (id)
);
-- sys_authorities definition
CREATE TABLE sys_authorities(
authority_id varchar(255) NOT NULL,
authority_name varchar(255),
parent_id varchar(255),
created_at TIMESTAMP,
updated_at TIMESTAMP,
deleted_at TIMESTAMP,
PRIMARY KEY (authority_id)
);
-- sys_authority_menus definition
CREATE TABLE sys_authority_menus(
sys_authority_authority_id varchar(255) NOT NULL,
sys_base_menu_id int NOT NULL,
PRIMARY KEY (sys_authority_authority_id,sys_base_menu_id)
);
-- sys_base_menus definition
CREATE TABLE sys_base_menus(
id int NOT NULL,
created_at TIMESTAMP,
updated_at TIMESTAMP,
deleted_at TIMESTAMP,
menu_level int,
parent_id int,
"path" varchar(255),
name varchar(255),
hidden tinyint,
component varchar(255),
title varchar(255),
icon varchar(255),
nick_name varchar(255),
sort int,
PRIMARY KEY (id)
);
-- sys_data_authority_id definition
CREATE TABLE sys_data_authority_id(
sys_authority_authority_id varchar(255) NOT NULL,
data_authority_id varchar(255) NOT NULL,
PRIMARY KEY (sys_authority_authority_id,data_authority_id)
);
-- sys_menus definition
CREATE TABLE sys_menus(
id int NOT NULL,
created_at TIMESTAMP,
updated_at TIMESTAMP,
deleted_at TIMESTAMP,
menu_level int,
authority_id int,
"path" varchar(255),
name varchar(255),
hidden tinyint,
component varchar(255),
title varchar(255),
icon varchar(255),
parent_id int,
menu_id varchar(255),
nick_name varchar(255),
sort varchar(255),
PRIMARY KEY (id)
);
-- sys_users definition
CREATE TABLE sys_users(
id int NOT NULL,
created_at TIMESTAMP,
updated_at TIMESTAMP,
deleted_at TIMESTAMP,
uuid BLOB,
user_name varchar(255),
pass_word varchar(255),
nick_name varchar(255),
header_img varchar(255),
authority_id double,
authority_name varchar(255),
username varchar(255),
password varchar(255),
phone_data varchar(255),
manager varchar(255),
PRIMARY KEY (id)
);
-- sys_workflow_step_infos definition
CREATE TABLE sys_workflow_step_infos(
id int NOT NULL,
created_at TIMESTAMP,
updated_at TIMESTAMP,
deleted_at TIMESTAMP,
workflow_id int,
is_strat tinyint,
step_name varchar(255),
step_no double,
step_authority_id varchar(255),
is_end tinyint,
sys_workflow_id int,
PRIMARY KEY (id)
);
-- sys_workflows definition
CREATE TABLE sys_workflows(
id int NOT NULL,
created_at TIMESTAMP,
updated_at TIMESTAMP,
deleted_at TIMESTAMP,
workflow_nick_name varchar(255),
workflow_name varchar(255),
workflow_description varchar(255),
PRIMARY KEY (id)
);
+20 -177
View File
@@ -1,6 +1,6 @@
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// This file was generated by swaggo/swag at
// 2020-08-20 11:59:55.622609 +0800 CST m=+0.106561201
// 2020-08-31 21:50:05.0136259 +0800 CST m=+0.193314401
package docs
@@ -50,7 +50,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.SysApi"
}
}
@@ -89,7 +88,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.SysApi"
}
}
@@ -155,7 +153,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.GetById"
}
}
@@ -194,7 +191,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.SearchApiParams"
}
}
@@ -233,7 +229,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.SysApi"
}
}
@@ -272,7 +267,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/response.SysAuthorityCopyResponse"
}
}
@@ -311,7 +305,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.SysAuthority"
}
}
@@ -350,7 +343,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.SysAuthority"
}
}
@@ -389,7 +381,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.PageInfo"
}
}
@@ -428,7 +419,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.SysAuthority"
}
}
@@ -467,7 +457,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.SysAuthority"
}
}
@@ -506,7 +495,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.AutoCodeStruct"
}
}
@@ -591,7 +579,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.RegisterAndLoginStruct"
}
}
@@ -622,7 +609,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.SysUser"
}
}
@@ -637,45 +623,6 @@ var doc = `{
}
}
},
"/casbin/CasbinTest": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"casbin"
],
"summary": "casb RBAC RESTFUL测试路由",
"parameters": [
{
"description": "获取权限列表",
"name": "data",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.CasbinInReceive"
}
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/casbin/UpdateCasbin": {
"post": {
"security": [
@@ -700,7 +647,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.CasbinInReceive"
}
}
@@ -739,7 +685,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.CasbinInReceive"
}
}
@@ -778,7 +723,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.ExaCustomer"
}
}
@@ -815,7 +759,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.ExaCustomer"
}
}
@@ -852,7 +795,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.ExaCustomer"
}
}
@@ -889,7 +831,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.ExaCustomer"
}
}
@@ -928,7 +869,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.PageInfo"
}
}
@@ -1000,7 +940,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.ExaFileUploadAndDownload"
}
}
@@ -1075,7 +1014,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.PageInfo"
}
}
@@ -1213,7 +1151,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.AuthorityIdInfo"
}
}
@@ -1252,7 +1189,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.SysBaseMenu"
}
}
@@ -1291,7 +1227,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.AddMenuAuthorityInfo"
}
}
@@ -1330,7 +1265,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.GetById"
}
}
@@ -1369,7 +1303,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.GetById"
}
}
@@ -1405,7 +1338,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.RegisterAndLoginStruct"
}
}
@@ -1441,7 +1373,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.RegisterAndLoginStruct"
}
}
@@ -1480,7 +1411,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.PageInfo"
}
}
@@ -1519,7 +1449,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.SysBaseMenu"
}
}
@@ -1651,7 +1580,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.SysDictionary"
}
}
@@ -1690,7 +1618,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.SysDictionary"
}
}
@@ -1729,7 +1656,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.SysDictionary"
}
}
@@ -1768,7 +1694,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.SysDictionarySearch"
}
}
@@ -1807,7 +1732,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.SysDictionary"
}
}
@@ -1846,7 +1770,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.SysDictionaryDetail"
}
}
@@ -1885,7 +1808,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.SysDictionaryDetail"
}
}
@@ -1924,7 +1846,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.SysDictionaryDetail"
}
}
@@ -1963,7 +1884,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.SysDictionaryDetailSearch"
}
}
@@ -2002,7 +1922,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.SysDictionaryDetail"
}
}
@@ -2041,7 +1960,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.SysOperationRecord"
}
}
@@ -2080,7 +1998,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.SysOperationRecord"
}
}
@@ -2119,7 +2036,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.IdsReq"
}
}
@@ -2158,7 +2074,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.SysOperationRecord"
}
}
@@ -2197,7 +2112,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.SysOperationRecordSearch"
}
}
@@ -2212,45 +2126,6 @@ var doc = `{
}
}
},
"/sysOperationRecord/updateSysOperationRecord": {
"put": {
"security": [
{
"ApiKeyAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"SysOperationRecord"
],
"summary": "更新SysOperationRecord",
"parameters": [
{
"description": "更新SysOperationRecord",
"name": "data",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.SysOperationRecord"
}
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"更新成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/system/ReloadSystem": {
"post": {
"security": [
@@ -2272,7 +2147,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.System"
}
}
@@ -2332,7 +2206,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.System"
}
}
@@ -2368,7 +2241,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.ChangePasswordStruct"
}
}
@@ -2407,7 +2279,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.GetById"
}
}
@@ -2446,7 +2317,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.PageInfo"
}
}
@@ -2485,7 +2355,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.SetUserAuth"
}
}
@@ -2500,49 +2369,6 @@ var doc = `{
}
}
},
"/user/uploadHeaderImg": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"consumes": [
"multipart/form-data"
],
"produces": [
"application/json"
],
"tags": [
"SysUser"
],
"summary": "用户上传头像",
"parameters": [
{
"type": "file",
"description": "用户上传头像",
"name": "headerImg",
"in": "formData",
"required": true
},
{
"type": "string",
"description": "用户上传头像",
"name": "username",
"in": "formData",
"required": true
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"上传成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/workflow/createWorkFlow": {
"post": {
"produces": [
@@ -2559,7 +2385,6 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.SysWorkflow"
}
}
@@ -2606,6 +2431,20 @@ var doc = `{
}
}
},
"config.LocalUpload": {
"type": "object",
"properties": {
"avatarPath": {
"type": "string"
},
"filePath": {
"type": "string"
},
"local": {
"type": "boolean"
}
}
},
"config.Log": {
"type": "object",
"properties": {
@@ -2698,6 +2537,10 @@ var doc = `{
"type": "object",
"$ref": "#/definitions/config.JWT"
},
"localUpload": {
"type": "object",
"$ref": "#/definitions/config.LocalUpload"
},
"log": {
"type": "object",
"$ref": "#/definitions/config.Log"
@@ -2980,7 +2823,7 @@ var doc = `{
"key": {
"type": "string"
},
"sysBaseMenuId": {
"sysBaseMenuID": {
"type": "integer"
},
"type": {
+19 -176
View File
@@ -33,7 +33,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.SysApi"
}
}
@@ -72,7 +71,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.SysApi"
}
}
@@ -138,7 +136,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.GetById"
}
}
@@ -177,7 +174,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.SearchApiParams"
}
}
@@ -216,7 +212,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.SysApi"
}
}
@@ -255,7 +250,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/response.SysAuthorityCopyResponse"
}
}
@@ -294,7 +288,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.SysAuthority"
}
}
@@ -333,7 +326,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.SysAuthority"
}
}
@@ -372,7 +364,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.PageInfo"
}
}
@@ -411,7 +402,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.SysAuthority"
}
}
@@ -450,7 +440,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.SysAuthority"
}
}
@@ -489,7 +478,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.AutoCodeStruct"
}
}
@@ -574,7 +562,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.RegisterAndLoginStruct"
}
}
@@ -605,7 +592,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.SysUser"
}
}
@@ -620,45 +606,6 @@
}
}
},
"/casbin/CasbinTest": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"casbin"
],
"summary": "casb RBAC RESTFUL测试路由",
"parameters": [
{
"description": "获取权限列表",
"name": "data",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.CasbinInReceive"
}
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/casbin/UpdateCasbin": {
"post": {
"security": [
@@ -683,7 +630,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.CasbinInReceive"
}
}
@@ -722,7 +668,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.CasbinInReceive"
}
}
@@ -761,7 +706,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.ExaCustomer"
}
}
@@ -798,7 +742,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.ExaCustomer"
}
}
@@ -835,7 +778,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.ExaCustomer"
}
}
@@ -872,7 +814,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.ExaCustomer"
}
}
@@ -911,7 +852,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.PageInfo"
}
}
@@ -983,7 +923,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.ExaFileUploadAndDownload"
}
}
@@ -1058,7 +997,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.PageInfo"
}
}
@@ -1196,7 +1134,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.AuthorityIdInfo"
}
}
@@ -1235,7 +1172,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.SysBaseMenu"
}
}
@@ -1274,7 +1210,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.AddMenuAuthorityInfo"
}
}
@@ -1313,7 +1248,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.GetById"
}
}
@@ -1352,7 +1286,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.GetById"
}
}
@@ -1388,7 +1321,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.RegisterAndLoginStruct"
}
}
@@ -1424,7 +1356,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.RegisterAndLoginStruct"
}
}
@@ -1463,7 +1394,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.PageInfo"
}
}
@@ -1502,7 +1432,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.SysBaseMenu"
}
}
@@ -1634,7 +1563,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.SysDictionary"
}
}
@@ -1673,7 +1601,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.SysDictionary"
}
}
@@ -1712,7 +1639,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.SysDictionary"
}
}
@@ -1751,7 +1677,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.SysDictionarySearch"
}
}
@@ -1790,7 +1715,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.SysDictionary"
}
}
@@ -1829,7 +1753,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.SysDictionaryDetail"
}
}
@@ -1868,7 +1791,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.SysDictionaryDetail"
}
}
@@ -1907,7 +1829,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.SysDictionaryDetail"
}
}
@@ -1946,7 +1867,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.SysDictionaryDetailSearch"
}
}
@@ -1985,7 +1905,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.SysDictionaryDetail"
}
}
@@ -2024,7 +1943,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.SysOperationRecord"
}
}
@@ -2063,7 +1981,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.SysOperationRecord"
}
}
@@ -2102,7 +2019,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.IdsReq"
}
}
@@ -2141,7 +2057,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.SysOperationRecord"
}
}
@@ -2180,7 +2095,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.SysOperationRecordSearch"
}
}
@@ -2195,45 +2109,6 @@
}
}
},
"/sysOperationRecord/updateSysOperationRecord": {
"put": {
"security": [
{
"ApiKeyAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"SysOperationRecord"
],
"summary": "更新SysOperationRecord",
"parameters": [
{
"description": "更新SysOperationRecord",
"name": "data",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.SysOperationRecord"
}
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"更新成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/system/ReloadSystem": {
"post": {
"security": [
@@ -2255,7 +2130,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.System"
}
}
@@ -2315,7 +2189,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.System"
}
}
@@ -2351,7 +2224,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.ChangePasswordStruct"
}
}
@@ -2390,7 +2262,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.GetById"
}
}
@@ -2429,7 +2300,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.PageInfo"
}
}
@@ -2468,7 +2338,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/request.SetUserAuth"
}
}
@@ -2483,49 +2352,6 @@
}
}
},
"/user/uploadHeaderImg": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"consumes": [
"multipart/form-data"
],
"produces": [
"application/json"
],
"tags": [
"SysUser"
],
"summary": "用户上传头像",
"parameters": [
{
"type": "file",
"description": "用户上传头像",
"name": "headerImg",
"in": "formData",
"required": true
},
{
"type": "string",
"description": "用户上传头像",
"name": "username",
"in": "formData",
"required": true
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"上传成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/workflow/createWorkFlow": {
"post": {
"produces": [
@@ -2542,7 +2368,6 @@
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/model.SysWorkflow"
}
}
@@ -2589,6 +2414,20 @@
}
}
},
"config.LocalUpload": {
"type": "object",
"properties": {
"avatarPath": {
"type": "string"
},
"filePath": {
"type": "string"
},
"local": {
"type": "boolean"
}
}
},
"config.Log": {
"type": "object",
"properties": {
@@ -2681,6 +2520,10 @@
"type": "object",
"$ref": "#/definitions/config.JWT"
},
"localUpload": {
"type": "object",
"$ref": "#/definitions/config.LocalUpload"
},
"log": {
"type": "object",
"$ref": "#/definitions/config.Log"
@@ -2963,7 +2806,7 @@
"key": {
"type": "string"
},
"sysBaseMenuId": {
"sysBaseMenuID": {
"type": "integer"
},
"type": {
+13 -130
View File
@@ -19,6 +19,15 @@ definitions:
signingKey:
type: string
type: object
config.LocalUpload:
properties:
avatarPath:
type: string
filePath:
type: string
local:
type: boolean
type: object
config.Log:
properties:
file:
@@ -80,6 +89,9 @@ definitions:
jwt:
$ref: '#/definitions/config.JWT'
type: object
localUpload:
$ref: '#/definitions/config.LocalUpload'
type: object
log:
$ref: '#/definitions/config.Log'
type: object
@@ -267,7 +279,7 @@ definitions:
properties:
key:
type: string
sysBaseMenuId:
sysBaseMenuID:
type: integer
type:
type: string
@@ -575,7 +587,6 @@ paths:
required: true
schema:
$ref: '#/definitions/model.SysApi'
type: object
produces:
- application/json
responses:
@@ -599,7 +610,6 @@ paths:
required: true
schema:
$ref: '#/definitions/model.SysApi'
type: object
produces:
- application/json
responses:
@@ -639,7 +649,6 @@ paths:
required: true
schema:
$ref: '#/definitions/request.GetById'
type: object
produces:
- application/json
responses:
@@ -663,7 +672,6 @@ paths:
required: true
schema:
$ref: '#/definitions/request.SearchApiParams'
type: object
produces:
- application/json
responses:
@@ -687,7 +695,6 @@ paths:
required: true
schema:
$ref: '#/definitions/model.SysApi'
type: object
produces:
- application/json
responses:
@@ -711,7 +718,6 @@ paths:
required: true
schema:
$ref: '#/definitions/response.SysAuthorityCopyResponse'
type: object
produces:
- application/json
responses:
@@ -735,7 +741,6 @@ paths:
required: true
schema:
$ref: '#/definitions/model.SysAuthority'
type: object
produces:
- application/json
responses:
@@ -759,7 +764,6 @@ paths:
required: true
schema:
$ref: '#/definitions/model.SysAuthority'
type: object
produces:
- application/json
responses:
@@ -783,7 +787,6 @@ paths:
required: true
schema:
$ref: '#/definitions/request.PageInfo'
type: object
produces:
- application/json
responses:
@@ -807,7 +810,6 @@ paths:
required: true
schema:
$ref: '#/definitions/model.SysAuthority'
type: object
produces:
- application/json
responses:
@@ -831,7 +833,6 @@ paths:
required: true
schema:
$ref: '#/definitions/model.SysAuthority'
type: object
produces:
- application/json
responses:
@@ -855,7 +856,6 @@ paths:
required: true
schema:
$ref: '#/definitions/model.AutoCodeStruct'
type: object
produces:
- application/json
responses:
@@ -909,7 +909,6 @@ paths:
required: true
schema:
$ref: '#/definitions/request.RegisterAndLoginStruct'
type: object
produces:
- application/json
responses:
@@ -929,7 +928,6 @@ paths:
required: true
schema:
$ref: '#/definitions/model.SysUser'
type: object
produces:
- application/json
responses:
@@ -940,30 +938,6 @@ paths:
summary: 用户注册账号
tags:
- Base
/casbin/CasbinTest:
get:
consumes:
- application/json
parameters:
- description: 获取权限列表
in: body
name: data
required: true
schema:
$ref: '#/definitions/request.CasbinInReceive'
type: object
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"获取成功"}'
schema:
type: string
security:
- ApiKeyAuth: []
summary: casb RBAC RESTFUL测试路由
tags:
- casbin
/casbin/UpdateCasbin:
post:
consumes:
@@ -975,7 +949,6 @@ paths:
required: true
schema:
$ref: '#/definitions/request.CasbinInReceive'
type: object
produces:
- application/json
responses:
@@ -999,7 +972,6 @@ paths:
required: true
schema:
$ref: '#/definitions/request.CasbinInReceive'
type: object
produces:
- application/json
responses:
@@ -1023,7 +995,6 @@ paths:
required: true
schema:
$ref: '#/definitions/model.ExaCustomer'
type: object
produces:
- application/json
responses:
@@ -1046,7 +1017,6 @@ paths:
required: true
schema:
$ref: '#/definitions/model.ExaCustomer'
type: object
produces:
- application/json
responses:
@@ -1069,7 +1039,6 @@ paths:
required: true
schema:
$ref: '#/definitions/model.ExaCustomer'
type: object
produces:
- application/json
responses:
@@ -1092,7 +1061,6 @@ paths:
required: true
schema:
$ref: '#/definitions/model.ExaCustomer'
type: object
produces:
- application/json
responses:
@@ -1116,7 +1084,6 @@ paths:
required: true
schema:
$ref: '#/definitions/request.PageInfo'
type: object
produces:
- application/json
responses:
@@ -1160,7 +1127,6 @@ paths:
required: true
schema:
$ref: '#/definitions/model.ExaFileUploadAndDownload'
type: object
produces:
- application/json
responses:
@@ -1206,7 +1172,6 @@ paths:
required: true
schema:
$ref: '#/definitions/request.PageInfo'
type: object
produces:
- application/json
responses:
@@ -1290,7 +1255,6 @@ paths:
required: true
schema:
$ref: '#/definitions/request.AuthorityIdInfo'
type: object
produces:
- application/json
responses:
@@ -1314,7 +1278,6 @@ paths:
required: true
schema:
$ref: '#/definitions/model.SysBaseMenu'
type: object
produces:
- application/json
responses:
@@ -1338,7 +1301,6 @@ paths:
required: true
schema:
$ref: '#/definitions/request.AddMenuAuthorityInfo'
type: object
produces:
- application/json
responses:
@@ -1362,7 +1324,6 @@ paths:
required: true
schema:
$ref: '#/definitions/request.GetById'
type: object
produces:
- application/json
responses:
@@ -1386,7 +1347,6 @@ paths:
required: true
schema:
$ref: '#/definitions/request.GetById'
type: object
produces:
- application/json
responses:
@@ -1408,7 +1368,6 @@ paths:
required: true
schema:
$ref: '#/definitions/request.RegisterAndLoginStruct'
type: object
produces:
- application/json
responses:
@@ -1430,7 +1389,6 @@ paths:
required: true
schema:
$ref: '#/definitions/request.RegisterAndLoginStruct'
type: object
produces:
- application/json
responses:
@@ -1454,7 +1412,6 @@ paths:
required: true
schema:
$ref: '#/definitions/request.PageInfo'
type: object
produces:
- application/json
responses:
@@ -1478,7 +1435,6 @@ paths:
required: true
schema:
$ref: '#/definitions/model.SysBaseMenu'
type: object
produces:
- application/json
responses:
@@ -1559,7 +1515,6 @@ paths:
required: true
schema:
$ref: '#/definitions/model.SysDictionary'
type: object
produces:
- application/json
responses:
@@ -1583,7 +1538,6 @@ paths:
required: true
schema:
$ref: '#/definitions/model.SysDictionary'
type: object
produces:
- application/json
responses:
@@ -1607,7 +1561,6 @@ paths:
required: true
schema:
$ref: '#/definitions/model.SysDictionary'
type: object
produces:
- application/json
responses:
@@ -1631,7 +1584,6 @@ paths:
required: true
schema:
$ref: '#/definitions/request.SysDictionarySearch'
type: object
produces:
- application/json
responses:
@@ -1655,7 +1607,6 @@ paths:
required: true
schema:
$ref: '#/definitions/model.SysDictionary'
type: object
produces:
- application/json
responses:
@@ -1679,7 +1630,6 @@ paths:
required: true
schema:
$ref: '#/definitions/model.SysDictionaryDetail'
type: object
produces:
- application/json
responses:
@@ -1703,7 +1653,6 @@ paths:
required: true
schema:
$ref: '#/definitions/model.SysDictionaryDetail'
type: object
produces:
- application/json
responses:
@@ -1727,7 +1676,6 @@ paths:
required: true
schema:
$ref: '#/definitions/model.SysDictionaryDetail'
type: object
produces:
- application/json
responses:
@@ -1751,7 +1699,6 @@ paths:
required: true
schema:
$ref: '#/definitions/request.SysDictionaryDetailSearch'
type: object
produces:
- application/json
responses:
@@ -1775,7 +1722,6 @@ paths:
required: true
schema:
$ref: '#/definitions/model.SysDictionaryDetail'
type: object
produces:
- application/json
responses:
@@ -1799,7 +1745,6 @@ paths:
required: true
schema:
$ref: '#/definitions/model.SysOperationRecord'
type: object
produces:
- application/json
responses:
@@ -1823,7 +1768,6 @@ paths:
required: true
schema:
$ref: '#/definitions/model.SysOperationRecord'
type: object
produces:
- application/json
responses:
@@ -1847,7 +1791,6 @@ paths:
required: true
schema:
$ref: '#/definitions/request.IdsReq'
type: object
produces:
- application/json
responses:
@@ -1871,7 +1814,6 @@ paths:
required: true
schema:
$ref: '#/definitions/model.SysOperationRecord'
type: object
produces:
- application/json
responses:
@@ -1895,7 +1837,6 @@ paths:
required: true
schema:
$ref: '#/definitions/request.SysOperationRecordSearch'
type: object
produces:
- application/json
responses:
@@ -1908,30 +1849,6 @@ paths:
summary: 分页获取SysOperationRecord列表
tags:
- SysOperationRecord
/sysOperationRecord/updateSysOperationRecord:
put:
consumes:
- application/json
parameters:
- description: 更新SysOperationRecord
in: body
name: data
required: true
schema:
$ref: '#/definitions/model.SysOperationRecord'
type: object
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"更新成功"}'
schema:
type: string
security:
- ApiKeyAuth: []
summary: 更新SysOperationRecord
tags:
- SysOperationRecord
/system/ReloadSystem:
post:
parameters:
@@ -1941,7 +1858,6 @@ paths:
required: true
schema:
$ref: '#/definitions/model.System'
type: object
produces:
- application/json
responses:
@@ -1977,7 +1893,6 @@ paths:
required: true
schema:
$ref: '#/definitions/model.System'
type: object
produces:
- application/json
responses:
@@ -1999,7 +1914,6 @@ paths:
required: true
schema:
$ref: '#/definitions/request.ChangePasswordStruct'
type: object
produces:
- application/json
responses:
@@ -2023,7 +1937,6 @@ paths:
required: true
schema:
$ref: '#/definitions/request.GetById'
type: object
produces:
- application/json
responses:
@@ -2047,7 +1960,6 @@ paths:
required: true
schema:
$ref: '#/definitions/request.PageInfo'
type: object
produces:
- application/json
responses:
@@ -2071,7 +1983,6 @@ paths:
required: true
schema:
$ref: '#/definitions/request.SetUserAuth'
type: object
produces:
- application/json
responses:
@@ -2084,33 +1995,6 @@ paths:
summary: 设置用户权限
tags:
- SysUser
/user/uploadHeaderImg:
post:
consumes:
- multipart/form-data
parameters:
- description: 用户上传头像
in: formData
name: headerImg
required: true
type: file
- description: 用户上传头像
in: formData
name: username
required: true
type: string
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"上传成功"}'
schema:
type: string
security:
- ApiKeyAuth: []
summary: 用户上传头像
tags:
- SysUser
/workflow/createWorkFlow:
post:
parameters:
@@ -2120,7 +2004,6 @@ paths:
required: true
schema:
$ref: '#/definitions/model.SysWorkflow'
type: object
produces:
- application/json
responses:
+5 -3
View File
@@ -1,11 +1,12 @@
package global
import (
"go.uber.org/zap"
"gin-vue-admin/config"
"github.com/go-redis/redis"
"github.com/jinzhu/gorm"
oplogging "github.com/op/go-logging"
"github.com/spf13/viper"
"gorm.io/gorm"
)
var (
@@ -13,5 +14,6 @@ var (
GVA_REDIS *redis.Client
GVA_CONFIG config.Server
GVA_VP *viper.Viper
GVA_LOG *oplogging.Logger
//GVA_LOG *oplogging.Logger
GVA_LOG *zap.Logger
)
+13 -13
View File
@@ -5,7 +5,8 @@ go 1.12
require (
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751
github.com/casbin/casbin v1.9.1
github.com/casbin/gorm-adapter v1.0.0
github.com/casbin/casbin/v2 v2.11.0
github.com/casbin/gorm-adapter/v3 v3.0.2
github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/fastly/go-utils v0.0.0-20180712184237-d95a45783239 // indirect
github.com/fsnotify/fsnotify v1.4.9
@@ -18,38 +19,37 @@ require (
github.com/go-sql-driver/mysql v1.5.0
github.com/golang/protobuf v1.4.2 // indirect
github.com/jehiah/go-strftime v0.0.0-20171201141054-1d33003b3869 // indirect
github.com/jinzhu/gorm v1.9.12
github.com/jordan-wright/email v0.0.0-20200824153738-3f5bafa1cd84
github.com/json-iterator/go v1.1.10 // indirect
github.com/lestrrat/go-envload v0.0.0-20180220120943-6ed08b54a570 // indirect
github.com/lestrrat/go-file-rotatelogs v0.0.0-20180223000712-d3151e2a480f
github.com/lestrrat/go-strftime v0.0.0-20180220042222-ba3bf9c1d042 // indirect
github.com/lib/pq v1.3.0 // indirect
github.com/lestrrat-go/file-rotatelogs v2.3.0+incompatible
github.com/lestrrat-go/strftime v1.0.3 // indirect
github.com/mailru/easyjson v0.7.1 // indirect
github.com/mitchellh/mapstructure v1.2.2 // indirect
github.com/mojocn/base64Captcha v1.3.1
github.com/onsi/ginkgo v1.7.0 // indirect
github.com/onsi/gomega v1.4.3 // indirect
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7
github.com/pelletier/go-toml v1.6.0 // indirect
github.com/piexlmax/gvaplug v0.0.8
github.com/pkg/errors v0.9.1 // indirect
github.com/qiniu/api.v7/v7 v7.4.1
github.com/qiniu/x v1.10.5
github.com/satori/go.uuid v1.2.0
github.com/spf13/afero v1.2.2 // indirect
github.com/spf13/cast v1.3.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.6.2
github.com/swaggo/gin-swagger v1.2.0
github.com/swaggo/swag v1.6.5
github.com/swaggo/swag v1.6.7
github.com/tebeka/strftime v0.1.3 // indirect
github.com/unrolled/secure v1.0.7
golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59 // indirect
golang.org/x/net v0.0.0-20200320220750-118fecf932d8 // indirect
go.uber.org/zap v1.10.0
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e // indirect
golang.org/x/sys v0.0.0-20200610111108-226ff32320da // indirect
golang.org/x/tools v0.0.0-20200324003944-a576cf524670 // indirect
google.golang.org/protobuf v1.24.0 // indirect
gopkg.in/ini.v1 v1.55.0 // indirect
gopkg.in/yaml.v2 v2.3.0 // indirect
gorm.io/driver/mysql v0.3.0
gorm.io/driver/postgres v0.2.6
gorm.io/driver/sqlserver v0.2.4
gorm.io/gorm v1.20.1
)
+485
View File
@@ -0,0 +1,485 @@
package init_data
import (
"gin-vue-admin/global"
"gin-vue-admin/model"
gormadapter "github.com/casbin/gorm-adapter/v3"
"github.com/satori/go.uuid"
"go.uber.org/zap"
"gorm.io/gorm"
"time"
)
type SysAuthorityMenus struct {
SysAuthorityAuthorityId string
SysBaseMenuId uint
}
type SysDataAuthorityId struct {
SysAuthorityAuthorityId string
DataAuthorityIdAuthorityId string
}
func InitSysApi() (err error) {
tx := global.GVA_DB.Begin() // 开始事务
insert := []model.SysApi{
{gorm.Model{ID: 1, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/base/login", "用户登录", "base", "POST"},
{gorm.Model{ID: 2, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/base/register", "用户注册", "base", "POST"},
{gorm.Model{ID: 3, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/api/createApi", "创建api", "api", "POST"},
{gorm.Model{ID: 4, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/api/getApiList", "获取api列表", "api", "POST"},
{gorm.Model{ID: 5, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/api/getApiById", "获取api详细信息", "api", "POST"},
{gorm.Model{ID: 6, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/api/deleteApi", "删除Api", "api", "POST"},
{gorm.Model{ID: 7, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/api/updateApi", "更新Api", "api", "POST"},
{gorm.Model{ID: 8, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/api/getAllApis", "获取所有api", "api", "POST"},
{gorm.Model{ID: 9, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/authority/createAuthority", "创建角色", "authority", "POST"},
{gorm.Model{ID: 10, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/authority/deleteAuthority", "删除角色", "authority", "POST"},
{gorm.Model{ID: 11, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/authority/getAuthorityList", "获取角色列表", "authority", "POST"},
{gorm.Model{ID: 12, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/menu/getMenu", "获取菜单树", "menu", "POST"},
{gorm.Model{ID: 13, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/menu/getMenuList", "分页获取基础menu列表", "menu", "POST"},
{gorm.Model{ID: 14, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/menu/addBaseMenu", "新增菜单", "menu", "POST"},
{gorm.Model{ID: 15, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/menu/getBaseMenuTree", "获取用户动态路由", "menu", "POST"},
{gorm.Model{ID: 16, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/menu/addMenuAuthority", "增加menu和角色关联关系", "menu", "POST"},
{gorm.Model{ID: 17, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/menu/getMenuAuthority", "获取指定角色menu", "menu", "POST"},
{gorm.Model{ID: 18, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/menu/deleteBaseMenu", "删除菜单", "menu", "POST"},
{gorm.Model{ID: 19, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/menu/updateBaseMenu", "更新菜单", "menu", "POST"},
{gorm.Model{ID: 20, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/menu/getBaseMenuById", "根据id获取菜单", "menu", "POST"},
{gorm.Model{ID: 21, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/user/changePassword", "修改密码", "user", "POST"},
{gorm.Model{ID: 23, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/user/getUserList", "获取用户列表", "user", "POST"},
{gorm.Model{ID: 24, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/user/setUserAuthority", "修改用户角色", "user", "POST"},
{gorm.Model{ID: 25, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/fileUploadAndDownload/upload", "文件上传示例", "fileUploadAndDownload", "POST"},
{gorm.Model{ID: 26, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/fileUploadAndDownload/getFileList", "获取上传文件列表", "fileUploadAndDownload", "POST"},
{gorm.Model{ID: 27, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/casbin/updateCasbin", "更改角色api权限", "casbin", "POST"},
{gorm.Model{ID: 28, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/casbin/getPolicyPathByAuthorityId", "获取权限列表", "casbin", "POST"},
{gorm.Model{ID: 29, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/fileUploadAndDownload/deleteFile", "删除文件", "fileUploadAndDownload", "POST"},
{gorm.Model{ID: 30, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/jwt/jsonInBlacklist", "jwt加入黑名单", "jwt", "POST"},
{gorm.Model{ID: 31, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/authority/setDataAuthority", "设置角色资源权限", "authority", "POST"},
{gorm.Model{ID: 32, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/system/getSystemConfig", "获取配置文件内容", "system", "POST"},
{gorm.Model{ID: 33, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/system/setSystemConfig", "设置配置文件内容", "system", "POST"},
{gorm.Model{ID: 34, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/customer/customer", "创建客户", "customer", "POST"},
{gorm.Model{ID: 35, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/customer/customer", "更新客户", "customer", "PUT"},
{gorm.Model{ID: 36, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/customer/customer", "删除客户", "customer", "DELETE"},
{gorm.Model{ID: 37, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/customer/customer", "获取单一客户", "customer", "GET"},
{gorm.Model{ID: 38, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/customer/customerList", "获取客户列表", "customer", "GET"},
{gorm.Model{ID: 39, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/casbin/casbinTest/:pathParam", "RESTFUL模式测试", "casbin", "GET"},
{gorm.Model{ID: 40, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/autoCode/createTemp", "自动化代码", "autoCode", "POST"},
{gorm.Model{ID: 41, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/authority/updateAuthority", "更新角色信息", "authority", "PUT"},
{gorm.Model{ID: 42, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/authority/copyAuthority", "拷贝角色", "authority", "POST"},
{gorm.Model{ID: 43, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/user/deleteUser", "删除用户", "user", "DELETE"},
{gorm.Model{ID: 44, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/sysDictionaryDetail/createSysDictionaryDetail", "新增字典内容", "sysDictionaryDetail", "POST"},
{gorm.Model{ID: 45, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/sysDictionaryDetail/deleteSysDictionaryDetail", "删除字典内容", "sysDictionaryDetail", "DELETE"},
{gorm.Model{ID: 46, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/sysDictionaryDetail/updateSysDictionaryDetail", "更新字典内容", "sysDictionaryDetail", "PUT"},
{gorm.Model{ID: 47, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/sysDictionaryDetail/findSysDictionaryDetail", "根据ID获取字典内容", "sysDictionaryDetail", "GET"},
{gorm.Model{ID: 48, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/sysDictionaryDetail/getSysDictionaryDetailList", "获取字典内容列表", "sysDictionaryDetail", "GET"},
{gorm.Model{ID: 49, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/sysDictionary/createSysDictionary", "新增字典", "sysDictionary", "POST"},
{gorm.Model{ID: 50, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/sysDictionary/deleteSysDictionary", "删除字典", "sysDictionary", "DELETE"},
{gorm.Model{ID: 51, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/sysDictionary/updateSysDictionary", "更新字典", "sysDictionary", "PUT"},
{gorm.Model{ID: 52, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/sysDictionary/findSysDictionary", "根据ID获取字典", "sysDictionary", "GET"},
{gorm.Model{ID: 53, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/sysDictionary/getSysDictionaryList", "获取字典列表", "sysDictionary", "GET"},
{gorm.Model{ID: 54, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/sysOperationRecord/createSysOperationRecord", "新增操作记录", "sysOperationRecord", "POST"},
{gorm.Model{ID: 55, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/sysOperationRecord/deleteSysOperationRecord", "删除操作记录", "sysOperationRecord", "DELETE"},
{gorm.Model{ID: 56, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/sysOperationRecord/findSysOperationRecord", "根据ID获取操作记录", "sysOperationRecord", "GET"},
{gorm.Model{ID: 57, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/sysOperationRecord/getSysOperationRecordList", "获取操作记录列表", "sysOperationRecord", "GET"},
{gorm.Model{ID: 58, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/autoCode/getTables", "获取数据库表", "autoCode", "GET"},
{gorm.Model{ID: 59, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/autoCode/getDB", "获取所有数据库", "autoCode", "GET"},
{gorm.Model{ID: 60, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/autoCode/getColume", "获取所选table的所有字段", "autoCode", "GET"},
{gorm.Model{ID: 61, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/sysOperationRecord/deleteSysOperationRecordByIds", "批量删除操作历史", "sysOperationRecord", "DELETE"},
{gorm.Model{ID: 62, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/simpleUploader/upload", "插件版分片上传", "simpleUploader", "POST"},
{gorm.Model{ID: 63, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/simpleUploader/checkFileMd5", "文件完整度验证", "simpleUploader", "GET"},
{gorm.Model{ID: 64, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/simpleUploader/mergeFileMd5", "上传完成合并文件", "simpleUploader", "GET"},
{gorm.Model{ID: 65, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/user/setUserInfo", "设置用户信息", "user", "PUT"},
}
if tx.Create(&insert).Error != nil { // 遇到错误时回滚事务
tx.Rollback()
}
return tx.Commit().Error
}
func InitSysUser() (err error) {
tx := global.GVA_DB.Begin() // 开始事务
insert := []model.SysUser{
{Model: gorm.Model{ID: 1, CreatedAt: time.Now(), UpdatedAt: time.Now()}, UUID: uuid.NewV4(), Username: "admin", Password: "e10adc3949ba59abbe56e057f20f883e", NickName: "超级管理员", HeaderImg: "http://qmplusimg.henrongyi.top/1571627762timg.jpg", AuthorityId: "888"},
{Model: gorm.Model{ID: 2, CreatedAt: time.Now(), UpdatedAt: time.Now()}, UUID: uuid.NewV4(), Username: "a303176530", Password: "3ec063004a6f31642261936a379fde3d", NickName: "QMPlusUser", HeaderImg: "http://qmplusimg.henrongyi.top/1572075907logo.png", AuthorityId: "9528"},
}
if tx.Create(&insert).Error != nil { // 遇到错误时回滚事务
tx.Rollback()
}
return tx.Commit().Error
}
func InitExaCustomer() (err error) {
tx := global.GVA_DB.Begin() // 开始事务
insert := []model.ExaCustomer{
{Model: gorm.Model{ID: 1, CreatedAt: time.Now(), UpdatedAt: time.Now()}, CustomerName: "测试客户", CustomerPhoneData: "1761111111", SysUserID: 1, SysUserAuthorityID: "888"},
}
if tx.Create(&insert).Error != nil { // 遇到错误时回滚事务
tx.Rollback()
}
return tx.Commit().Error
}
func InitCasbinModel() (err error) {
if !global.GVA_DB.Migrator().HasTable("casbin_rule") {
if err := global.GVA_DB.Migrator().CreateTable(&gormadapter.CasbinRule{}); err != nil {
return err
}
}
tx := global.GVA_DB.Begin() // 开始事务
insert := []model.CasbinModel{
{"p", "888", "/base/login", "POST"},
{"p", "888", "/base/register", "POST"},
{"p", "888", "/api/createApi", "POST"},
{"p", "888", "/api/getApiList", "POST"},
{"p", "888", "/api/getApiById", "POST"},
{"p", "888", "/api/deleteApi", "POST"},
{"p", "888", "/api/updateApi", "POST"},
{"p", "888", "/api/getAllApis", "POST"},
{"p", "888", "/authority/createAuthority", "POST"},
{"p", "888", "/authority/deleteAuthority", "POST"},
{"p", "888", "/authority/getAuthorityList", "POST"},
{"p", "888", "/authority/setDataAuthority", "POST"},
{"p", "888", "/authority/updateAuthority", "PUT"},
{"p", "888", "/authority/copyAuthority", "POST"},
{"p", "888", "/menu/getMenu", "POST"},
{"p", "888", "/menu/getMenuList", "POST"},
{"p", "888", "/menu/addBaseMenu", "POST"},
{"p", "888", "/menu/getBaseMenuTree", "POST"},
{"p", "888", "/menu/addMenuAuthority", "POST"},
{"p", "888", "/menu/getMenuAuthority", "POST"},
{"p", "888", "/menu/deleteBaseMenu", "POST"},
{"p", "888", "/menu/updateBaseMenu", "POST"},
{"p", "888", "/menu/getBaseMenuById", "POST"},
{"p", "888", "/user/changePassword", "POST"},
{"p", "888", "/user/getUserList", "POST"},
{"p", "888", "/user/setUserAuthority", "POST"},
{"p", "888", "/user/deleteUser", "DELETE"},
{"p", "888", "/fileUploadAndDownload/upload", "POST"},
{"p", "888", "/fileUploadAndDownload/getFileList", "POST"},
{"p", "888", "/fileUploadAndDownload/deleteFile", "POST"},
{"p", "888", "/casbin/updateCasbin", "POST"},
{"p", "888", "/casbin/getPolicyPathByAuthorityId", "POST"},
{"p", "888", "/casbin/casbinTest/:pathParam", "GET"},
{"p", "888", "/jwt/jsonInBlacklist", "POST"},
{"p", "888", "/system/getSystemConfig", "POST"},
{"p", "888", "/system/setSystemConfig", "POST"},
{"p", "888", "/customer/customer", "POST"},
{"p", "888", "/customer/customer", "PUT"},
{"p", "888", "/customer/customer", "DELETE"},
{"p", "888", "/customer/customer", "GET"},
{"p", "888", "/customer/customerList", "GET"},
{"p", "888", "/autoCode/createTemp", "POST"},
{"p", "888", "/autoCode/getTables", "GET"},
{"p", "888", "/autoCode/getDB", "GET"},
{"p", "888", "/autoCode/getColume", "GET"},
{"p", "888", "/sysDictionaryDetail/createSysDictionaryDetail", "POST"},
{"p", "888", "/sysDictionaryDetail/deleteSysDictionaryDetail", "DELETE"},
{"p", "888", "/sysDictionaryDetail/updateSysDictionaryDetail", "PUT"},
{"p", "888", "/sysDictionaryDetail/findSysDictionaryDetail", "GET"},
{"p", "888", "/sysDictionaryDetail/getSysDictionaryDetailList", "GET"},
{"p", "888", "/sysDictionary/createSysDictionary", "POST"},
{"p", "888", "/sysDictionary/deleteSysDictionary", "DELETE"},
{"p", "888", "/sysDictionary/updateSysDictionary", "PUT"},
{"p", "888", "/sysDictionary/findSysDictionary", "GET"},
{"p", "888", "/sysDictionary/getSysDictionaryList", "GET"},
{"p", "888", "/sysOperationRecord/createSysOperationRecord", "POST"},
{"p", "888", "/sysOperationRecord/deleteSysOperationRecord", "DELETE"},
{"p", "888", "/sysOperationRecord/updateSysOperationRecord", "PUT"},
{"p", "888", "/sysOperationRecord/findSysOperationRecord", "GET"},
{"p", "888", "/sysOperationRecord/getSysOperationRecordList", "GET"},
{"p", "888", "/sysOperationRecord/deleteSysOperationRecordByIds", "DELETE"},
{"p", "888", "/user/setUserInfo", "PUT"},
{"p", "8881", "/base/login", "POST"},
{"p", "8881", "/base/register", "POST"},
{"p", "8881", "/api/createApi", "POST"},
{"p", "8881", "/api/getApiList", "POST"},
{"p", "8881", "/api/getApiById", "POST"},
{"p", "8881", "/api/deleteApi", "POST"},
{"p", "8881", "/api/updateApi", "POST"},
{"p", "8881", "/api/getAllApis", "POST"},
{"p", "8881", "/authority/createAuthority", "POST"},
{"p", "8881", "/authority/deleteAuthority", "POST"},
{"p", "8881", "/authority/getAuthorityList", "POST"},
{"p", "8881", "/authority/setDataAuthority", "POST"},
{"p", "8881", "/menu/getMenu", "POST"},
{"p", "8881", "/menu/getMenuList", "POST"},
{"p", "8881", "/menu/addBaseMenu", "POST"},
{"p", "8881", "/menu/getBaseMenuTree", "POST"},
{"p", "8881", "/menu/addMenuAuthority", "POST"},
{"p", "8881", "/menu/getMenuAuthority", "POST"},
{"p", "8881", "/menu/deleteBaseMenu", "POST"},
{"p", "8881", "/menu/updateBaseMenu", "POST"},
{"p", "8881", "/menu/getBaseMenuById", "POST"},
{"p", "8881", "/user/changePassword", "POST"},
{"p", "8881", "/user/getUserList", "POST"},
{"p", "8881", "/user/setUserAuthority", "POST"},
{"p", "8881", "/fileUploadAndDownload/upload", "POST"},
{"p", "8881", "/fileUploadAndDownload/getFileList", "POST"},
{"p", "8881", "/fileUploadAndDownload/deleteFile", "POST"},
{"p", "8881", "/casbin/updateCasbin", "POST"},
{"p", "8881", "/casbin/getPolicyPathByAuthorityId", "POST"},
{"p", "8881", "/jwt/jsonInBlacklist", "POST"},
{"p", "8881", "/system/getSystemConfig", "POST"},
{"p", "8881", "/system/setSystemConfig", "POST"},
{"p", "8881", "/customer/customer", "POST"},
{"p", "8881", "/customer/customer", "PUT"},
{"p", "8881", "/customer/customer", "DELETE"},
{"p", "8881", "/customer/customer", "GET"},
{"p", "8881", "/customer/customerList", "GET"},
{"p", "9528", "/base/login", "POST"},
{"p", "9528", "/base/register", "POST"},
{"p", "9528", "/api/createApi", "POST"},
{"p", "9528", "/api/getApiList", "POST"},
{"p", "9528", "/api/getApiById", "POST"},
{"p", "9528", "/api/deleteApi", "POST"},
{"p", "9528", "/api/updateApi", "POST"},
{"p", "9528", "/api/getAllApis", "POST"},
{"p", "9528", "/authority/createAuthority", "POST"},
{"p", "9528", "/authority/deleteAuthority", "POST"},
{"p", "9528", "/authority/getAuthorityList", "POST"},
{"p", "9528", "/authority/setDataAuthority", "POST"},
{"p", "9528", "/menu/getMenu", "POST"},
{"p", "9528", "/menu/getMenuList", "POST"},
{"p", "9528", "/menu/addBaseMenu", "POST"},
{"p", "9528", "/menu/getBaseMenuTree", "POST"},
{"p", "9528", "/menu/addMenuAuthority", "POST"},
{"p", "9528", "/menu/getMenuAuthority", "POST"},
{"p", "9528", "/menu/deleteBaseMenu", "POST"},
{"p", "9528", "/menu/updateBaseMenu", "POST"},
{"p", "9528", "/menu/getBaseMenuById", "POST"},
{"p", "9528", "/user/changePassword", "POST"},
{"p", "9528", "/user/getUserList", "POST"},
{"p", "9528", "/user/setUserAuthority", "POST"},
{"p", "9528", "/fileUploadAndDownload/upload", "POST"},
{"p", "9528", "/fileUploadAndDownload/getFileList", "POST"},
{"p", "9528", "/fileUploadAndDownload/deleteFile", "POST"},
{"p", "9528", "/casbin/updateCasbin", "POST"},
{"p", "9528", "/casbin/getPolicyPathByAuthorityId", "POST"},
{"p", "9528", "/jwt/jsonInBlacklist", "POST"},
{"p", "9528", "/system/getSystemConfig", "POST"},
{"p", "9528", "/system/setSystemConfig", "POST"},
{"p", "9528", "/customer/customer", "POST"},
{"p", "9528", "/customer/customer", "PUT"},
{"p", "9528", "/customer/customer", "DELETE"},
{"p", "9528", "/customer/customer", "GET"},
{"p", "9528", "/customer/customerList", "GET"},
{"p", "9528", "/autoCode/createTemp", "POST"},
}
if tx.Table("casbin_rule").Create(&insert).Error != nil { // 遇到错误时回滚事务
tx.Rollback()
}
return tx.Commit().Error
}
func InitSysAuthority() (err error) {
tx := global.GVA_DB.Begin() // 开始事务
insert := []model.SysAuthority{
{CreatedAt: time.Now(), UpdatedAt: time.Now(), AuthorityId: "888", AuthorityName: "普通用户", ParentId: "0"},
{CreatedAt: time.Now(), UpdatedAt: time.Now(), AuthorityId: "8881", AuthorityName: "普通用户子角色", ParentId: "888"},
{CreatedAt: time.Now(), UpdatedAt: time.Now(), AuthorityId: "9528", AuthorityName: "测试角色", ParentId: "0"},
}
if tx.Create(&insert).Error != nil { // 遇到错误时回滚事务
tx.Rollback()
}
return tx.Commit().Error
}
func InitSysBaseMenus() (err error) {
tx := global.GVA_DB.Begin() // 开始事务
insert := []model.SysBaseMenu{
{Model: gorm.Model{ID: 1, CreatedAt: time.Now(), UpdatedAt: time.Now()}, MenuLevel: 0, ParentId: "0", Path: "dashboard", Name: "dashboard", Hidden: false, Component: "view/dashboard/index.vue", Sort: 1, Meta: model.Meta{Title: "仪表盘", Icon: "setting"}},
{Model: gorm.Model{ID: 2, CreatedAt: time.Now(), UpdatedAt: time.Now()}, MenuLevel: 0, Hidden: false, ParentId: "0", Path: "about", Name: "about", Component: "view/about/index.vue", Sort: 7, Meta: model.Meta{Title: "关于我们", Icon: "info"}},
{Model: gorm.Model{ID: 3, CreatedAt: time.Now(), UpdatedAt: time.Now()}, MenuLevel: 0, Hidden: false, ParentId: "0", Path: "admin", Name: "superAdmin", Component: "view/superAdmin/index.vue", Sort: 3, Meta: model.Meta{Title: "超级管理员", Icon: "user-solid"}},
{Model: gorm.Model{ID: 4, CreatedAt: time.Now(), UpdatedAt: time.Now()}, MenuLevel: 0, Hidden: false, ParentId: "3", Path: "authority", Name: "authority", Component: "view/superAdmin/authority/authority.vue", Sort: 1, Meta: model.Meta{Title: "角色管理", Icon: "s-custom"}},
{Model: gorm.Model{ID: 5, CreatedAt: time.Now(), UpdatedAt: time.Now()}, MenuLevel: 0, Hidden: false, ParentId: "3", Path: "menu", Name: "menu", Component: "view/superAdmin/menu/menu.vue", Sort: 2, Meta: model.Meta{Title: "菜单管理", Icon: "s-order", KeepAlive: true}},
{Model: gorm.Model{ID: 6, CreatedAt: time.Now(), UpdatedAt: time.Now()}, MenuLevel: 0, Hidden: false, ParentId: "3", Path: "api", Name: "api", Component: "view/superAdmin/api/api.vue", Sort: 3, Meta: model.Meta{Title: "api管理", Icon: "s-platform", KeepAlive: true}},
{Model: gorm.Model{ID: 7, CreatedAt: time.Now(), UpdatedAt: time.Now()}, MenuLevel: 0, Hidden: false, ParentId: "3", Path: "user", Name: "user", Component: "view/superAdmin/user/user.vue", Sort: 4, Meta: model.Meta{Title: "用户管理", Icon: "coordinate"}},
{Model: gorm.Model{ID: 8, CreatedAt: time.Now(), UpdatedAt: time.Now()}, MenuLevel: 0, Hidden: true, ParentId: "0", Path: "person", Name: "person", Component: "view/person/person.vue", Sort: 4, Meta: model.Meta{Title: "个人信息", Icon: "message-solid"}},
{Model: gorm.Model{ID: 9, CreatedAt: time.Now(), UpdatedAt: time.Now()}, MenuLevel: 0, Hidden: false, ParentId: "0", Path: "example", Name: "example", Component: "view/example/index.vue", Sort: 6, Meta: model.Meta{Title: "示例文件", Icon: "s-management"}},
{Model: gorm.Model{ID: 10, CreatedAt: time.Now(), UpdatedAt: time.Now()}, MenuLevel: 0, Hidden: false, ParentId: "9", Path: "table", Name: "table", Component: "view/example/table/table.vue", Sort: 1, Meta: model.Meta{Title: "表格示例", Icon: "s-order"}},
{Model: gorm.Model{ID: 11, CreatedAt: time.Now(), UpdatedAt: time.Now()}, MenuLevel: 0, Hidden: false, ParentId: "9", Path: "form", Name: "form", Component: "view/example/form/form.vue", Sort: 2, Meta: model.Meta{Title: "表单示例", Icon: "document"}},
{Model: gorm.Model{ID: 12, CreatedAt: time.Now(), UpdatedAt: time.Now()}, MenuLevel: 0, Hidden: false, ParentId: "9", Path: "rte", Name: "rte", Component: "view/example/rte/rte.vue", Sort: 3, Meta: model.Meta{Title: "富文本编辑器", Icon: "reading"}},
{Model: gorm.Model{ID: 13, CreatedAt: time.Now(), UpdatedAt: time.Now()}, MenuLevel: 0, Hidden: false, ParentId: "9", Path: "excel", Name: "excel", Component: "view/example/excel/excel.vue", Sort: 4, Meta: model.Meta{Title: "excel导入导出", Icon: "s-marketing"}},
{Model: gorm.Model{ID: 14, CreatedAt: time.Now(), UpdatedAt: time.Now()}, MenuLevel: 0, Hidden: false, ParentId: "9", Path: "upload", Name: "upload", Component: "view/example/upload/upload.vue", Sort: 5, Meta: model.Meta{Title: "上传下载", Icon: "upload"}},
{Model: gorm.Model{ID: 15, CreatedAt: time.Now(), UpdatedAt: time.Now()}, MenuLevel: 0, Hidden: false, ParentId: "9", Path: "breakpoint", Name: "breakpoint", Component: "view/example/breakpoint/breakpoint.vue", Sort: 6, Meta: model.Meta{Title: "断点续传", Icon: "upload"}},
{Model: gorm.Model{ID: 16, CreatedAt: time.Now(), UpdatedAt: time.Now()}, MenuLevel: 0, Hidden: false, ParentId: "9", Path: "customer", Name: "customer", Component: "view/example/customer/customer.vue", Sort: 7, Meta: model.Meta{Title: "客户列表(资源示例)", Icon: "s-custom"}},
{Model: gorm.Model{ID: 17, CreatedAt: time.Now(), UpdatedAt: time.Now()}, MenuLevel: 0, Hidden: false, ParentId: "0", Path: "systemTools", Name: "systemTools", Component: "view/systemTools/index.vue", Sort: 5, Meta: model.Meta{Title: "系统工具", Icon: "s-cooperation"}},
{Model: gorm.Model{ID: 18, CreatedAt: time.Now(), UpdatedAt: time.Now()}, MenuLevel: 0, Hidden: false, ParentId: "17", Path: "autoCode", Name: "autoCode", Component: "view/systemTools/autoCode/index.vue", Sort: 1, Meta: model.Meta{Title: "代码生成器", Icon: "cpu", KeepAlive: true}},
{Model: gorm.Model{ID: 19, CreatedAt: time.Now(), UpdatedAt: time.Now()}, MenuLevel: 0, Hidden: false, ParentId: "17", Path: "formCreate", Name: "formCreate", Component: "view/systemTools/formCreate/index.vue", Sort: 2, Meta: model.Meta{Title: "表单生成器", Icon: "magic-stick", KeepAlive: true}},
{Model: gorm.Model{ID: 20, CreatedAt: time.Now(), UpdatedAt: time.Now()}, MenuLevel: 0, Hidden: false, ParentId: "17", Path: "system", Name: "system", Component: "view/systemTools/system/system.vue", Sort: 3, Meta: model.Meta{Title: "系统配置", Icon: "s-operation"}},
{Model: gorm.Model{ID: 21, CreatedAt: time.Now(), UpdatedAt: time.Now()}, MenuLevel: 0, Hidden: false, ParentId: "0", Path: "iconList", Name: "iconList", Component: "view/iconList/index.vue", Sort: 2, Meta: model.Meta{Title: "图标集合", Icon: "star-on"}},
{Model: gorm.Model{ID: 22, CreatedAt: time.Now(), UpdatedAt: time.Now()}, MenuLevel: 0, Hidden: false, ParentId: "3", Path: "dictionary", Name: "dictionary", Component: "view/superAdmin/dictionary/sysDictionary.vue", Sort: 5, Meta: model.Meta{Title: "字典管理", Icon: "notebook-2"}},
{Model: gorm.Model{ID: 23, CreatedAt: time.Now(), UpdatedAt: time.Now()}, MenuLevel: 0, Hidden: true, ParentId: "3", Path: "dictionaryDetail/:id", Name: "dictionaryDetail", Component: "view/superAdmin/dictionary/sysDictionaryDetail.vue", Sort: 1, Meta: model.Meta{Title: "字典详情", Icon: "s-order"}},
{Model: gorm.Model{ID: 24, CreatedAt: time.Now(), UpdatedAt: time.Now()}, MenuLevel: 0, Hidden: false, ParentId: "3", Path: "operation", Name: "operation", Component: "view/superAdmin/operation/sysOperationRecord.vue", Sort: 6, Meta: model.Meta{Title: "操作历史", Icon: "time"}},
{Model: gorm.Model{ID: 25, CreatedAt: time.Now(), UpdatedAt: time.Now()}, MenuLevel: 0, Hidden: false, ParentId: "9", Path: "simpleUploader", Name: "simpleUploader", Component: "view/example/simpleUploader/simpleUploader", Sort: 6, Meta: model.Meta{Title: "断点续传(插件版)", Icon: "upload"}},
{Model: gorm.Model{ID: 26, CreatedAt: time.Now(), UpdatedAt: time.Now()}, MenuLevel: 0, ParentId: "0", Path: "https://www.gin-vue-admin.com", Name: "https://www.gin-vue-admin.com", Hidden: false, Component: "/", Sort: 0, Meta: model.Meta{Title: "官方网站", Icon: "s-home"}},
}
if tx.Create(&insert).Error != nil { // 遇到错误时回滚事务
tx.Rollback()
}
return tx.Commit().Error
}
func InitAuthorityMenu() (err error) {
return global.GVA_DB.Exec("CREATE ALGORITHM = UNDEFINED SQL SECURITY DEFINER VIEW `authority_menu` AS select `sys_base_menus`.`id` AS `id`,`sys_base_menus`.`created_at` AS `created_at`, `sys_base_menus`.`updated_at` AS `updated_at`, `sys_base_menus`.`deleted_at` AS `deleted_at`, `sys_base_menus`.`menu_level` AS `menu_level`,`sys_base_menus`.`parent_id` AS `parent_id`,`sys_base_menus`.`path` AS `path`,`sys_base_menus`.`name` AS `name`,`sys_base_menus`.`hidden` AS `hidden`,`sys_base_menus`.`component` AS `component`, `sys_base_menus`.`title` AS `title`,`sys_base_menus`.`icon` AS `icon`,`sys_base_menus`.`sort` AS `sort`,`sys_authority_menus`.`sys_authority_authority_id` AS `authority_id`,`sys_authority_menus`.`sys_base_menu_id` AS `menu_id`,`sys_base_menus`.`keep_alive` AS `keep_alive`,`sys_base_menus`.`default_menu` AS `default_menu` from (`sys_authority_menus` join `sys_base_menus` on ((`sys_authority_menus`.`sys_base_menu_id` = `sys_base_menus`.`id`)))").Error
}
func InitSysDictionary() (err error) {
status := new(bool)
*status = true
tx := global.GVA_DB.Begin() // 开始事务
insert := []model.SysDictionary{
{Model: gorm.Model{ID: 1, CreatedAt: time.Now(), UpdatedAt: time.Now()}, Name: "性别", Type: "sex", Status: status, Desc: "性别字典"},
{Model: gorm.Model{ID: 2, CreatedAt: time.Now(), UpdatedAt: time.Now()}, Name: "数据库int类型", Type: "int", Status: status, Desc: "int类型对应的数据库类型"},
{Model: gorm.Model{ID: 3, CreatedAt: time.Now(), UpdatedAt: time.Now()}, Name: "数据库时间日期类型", Type: "time.Time", Status: status, Desc: "数据库时间日期类型"},
{Model: gorm.Model{ID: 4, CreatedAt: time.Now(), UpdatedAt: time.Now()}, Name: "数据库浮点型", Type: "float64", Status: status, Desc: "数据库浮点型"},
{Model: gorm.Model{ID: 5, CreatedAt: time.Now(), UpdatedAt: time.Now()}, Name: "数据库字符串", Type: "string", Status: status, Desc: "数据库字符串"},
{Model: gorm.Model{ID: 6, CreatedAt: time.Now(), UpdatedAt: time.Now()}, Name: "数据库bool类型", Type: "bool", Status: status, Desc: "数据库bool类型"},
}
if tx.Create(&insert).Error != nil { // 遇到错误时回滚事务
tx.Rollback()
}
return tx.Commit().Error
}
func InitSysAuthorityMenus() (err error) {
tx := global.GVA_DB.Begin() // 开始事务
insert := []SysAuthorityMenus{
{"888", 1},
{"888", 2},
{"888", 3},
{"888", 4},
{"888", 5},
{"888", 6},
{"888", 7},
{"888", 8},
{"888", 9},
{"888", 10},
{"888", 11},
{"888", 12},
{"888", 13},
{"888", 14},
{"888", 15},
{"888", 16},
{"888", 17},
{"888", 18},
{"888", 19},
{"888", 20},
{"888", 21},
{"888", 22},
{"888", 23},
{"888", 24},
{"888", 25},
{"888", 26},
{"8881", 1},
{"8881", 2},
{"8881", 8},
{"8881", 17},
{"8881", 18},
{"8881", 19},
{"8881", 20},
{"9528", 1},
{"9528", 2},
{"9528", 3},
{"9528", 4},
{"9528", 5},
{"9528", 6},
{"9528", 7},
{"9528", 8},
{"9528", 9},
{"9528", 10},
{"9528", 11},
{"9528", 12},
{"9528", 13},
{"9528", 14},
{"9528", 15},
{"9528", 17},
{"9528", 18},
{"9528", 19},
{"9528", 20},
}
if tx.Table("sys_authority_menus").Create(&insert).Error != nil { // 遇到错误时回滚事务
tx.Rollback()
}
return tx.Commit().Error
}
func InitSysDataAuthorityId() (err error) {
tx := global.GVA_DB.Begin() // 开始事务
insert := []SysDataAuthorityId{
{"888", "888"},
{"888", "8881"},
{"888", "9528"},
{"9528", "8881"},
{"9528", "9528"},
}
if tx.Table("sys_data_authority_id").Create(&insert).Error != nil { // 遇到错误时回滚事务
tx.Rollback()
}
return tx.Commit().Error
}
func InitSysDictionaryDetail() (err error) {
status := new(bool)
*status = true
tx := global.GVA_DB.Begin() // 开始事务
insert := []model.SysDictionaryDetail{
{gorm.Model{ID: 1, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "smallint", 1, status, 1, 2},
{gorm.Model{ID: 2, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "mediumint", 2, status, 2, 2},
{gorm.Model{ID: 3, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "int", 3, status, 3, 2},
{gorm.Model{ID: 4, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "bigint", 4, status, 4, 2},
{gorm.Model{ID: 5, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "data", 0, status, 0, 3},
{gorm.Model{ID: 6, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "time", 1, status, 1, 3},
{gorm.Model{ID: 7, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "year", 2, status, 2, 3},
{gorm.Model{ID: 8, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "datetime", 3, status, 3, 3},
{gorm.Model{ID: 9, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "timestamp", 5, status, 5, 3},
{gorm.Model{ID: 10, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "float", 0, status, 0, 4},
{gorm.Model{ID: 11, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "double", 1, status, 1, 4},
{gorm.Model{ID: 12, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "decimal", 2, status, 2, 4},
{gorm.Model{ID: 13, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "char", 0, status, 0, 5},
{gorm.Model{ID: 14, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "varchar", 1, status, 1, 5},
{gorm.Model{ID: 15, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "tinyblob", 2, status, 2, 5},
{gorm.Model{ID: 16, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "tinytext", 3, status, 3, 5},
{gorm.Model{ID: 17, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "text", 4, status, 4, 5},
{gorm.Model{ID: 18, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "blob", 5, status, 5, 5},
{gorm.Model{ID: 19, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "mediumblob", 6, status, 6, 5},
{gorm.Model{ID: 20, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "mediumtext", 7, status, 7, 5},
{gorm.Model{ID: 21, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "longblob", 8, status, 8, 5},
{gorm.Model{ID: 22, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "longtext", 9, status, 9, 5},
{gorm.Model{ID: 23, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "tinyint", 0, status, 0, 6},
}
if tx.Create(&insert).Error != nil { // 遇到错误时回滚事务
tx.Rollback()
}
return tx.Commit().Error
}
func InitExaFileUploadAndDownload() (err error) {
tx := global.GVA_DB.Begin() // 开始事务
insert := []model.ExaFileUploadAndDownload{
{gorm.Model{ID: 1, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "10.png", "http://qmplusimg.henrongyi.top/gvalogo.png", "png", "158787308910.png"},
{gorm.Model{ID: 2, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "logo.png", "http://qmplusimg.henrongyi.top/1576554439myAvatar.png", "png", "1587973709logo.png"},
}
if tx.Create(&insert).Error != nil { // 遇到错误时回滚事务
tx.Rollback()
}
return tx.Commit().Error
}
func InitData() {
var err error
err = InitSysApi()
err = InitSysUser()
err = InitExaCustomer()
err = InitCasbinModel()
err = InitSysAuthority()
err = InitSysBaseMenus()
err = InitAuthorityMenu()
err = InitSysDictionary()
err = InitSysAuthorityMenus()
err = InitSysDataAuthorityId()
err = InitSysDictionaryDetail()
err = InitExaFileUploadAndDownload()
if err != nil {
global.GVA_LOG.Error("initialize data failed", zap.Any("err", err))
}
global.GVA_LOG.Info("initialize data success")
}
-29
View File
@@ -1,29 +0,0 @@
package initialize
import (
"gin-vue-admin/global"
"gin-vue-admin/model"
)
// 注册数据库表专用
func DBTables() {
db := global.GVA_DB
db.AutoMigrate(model.SysUser{},
model.SysAuthority{},
model.SysApi{},
model.SysBaseMenu{},
model.SysBaseMenuParameter{},
model.JwtBlacklist{},
model.SysWorkflow{},
model.SysWorkflowStepInfo{},
model.SysDictionary{},
model.SysDictionaryDetail{},
model.ExaFileUploadAndDownload{},
model.ExaFile{},
model.ExaFileChunk{},
model.ExaSimpleUploader{},
model.ExaCustomer{},
model.SysOperationRecord{},
)
global.GVA_LOG.Debug("register table success")
}
+146
View File
@@ -0,0 +1,146 @@
package initialize
import (
"gin-vue-admin/global"
"gin-vue-admin/model"
"go.uber.org/zap"
"gorm.io/driver/mysql"
"gorm.io/driver/postgres"
"gorm.io/driver/sqlserver"
"gorm.io/gorm"
"gorm.io/gorm/logger"
"os"
)
var err error
// Gorm 初始化数据库并产生数据库全局变量
func Gorm() {
switch global.GVA_CONFIG.System.DbType {
case "mysql":
GormMysql()
case "postgresql":
GormPostgreSql()
//case "sqlite": // sqlite需要gcc支持 windows用户需要自行安装gcc 如需使用打开注释即可
// GormSqlite()
case "sqlserver":
GormSqlServer()
}
}
// GormDBTables 注册数据库表专用
func GormDBTables(db *gorm.DB) {
err := db.AutoMigrate(
model.SysUser{},
model.SysAuthority{},
model.SysApi{},
model.SysBaseMenu{},
model.SysBaseMenuParameter{},
model.JwtBlacklist{},
model.SysWorkflow{},
model.SysWorkflowStepInfo{},
model.SysDictionary{},
model.SysDictionaryDetail{},
model.ExaFileUploadAndDownload{},
model.ExaFile{},
model.ExaFileChunk{},
model.ExaSimpleUploader{},
model.ExaCustomer{},
model.SysOperationRecord{},
)
if err != nil {
global.GVA_LOG.Error("register table failed", zap.Any("err", err))
os.Exit(0)
}
global.GVA_LOG.Info("register table success")
}
// GormMysql 初始化Mysql数据库
func GormMysql() {
m := global.GVA_CONFIG.Mysql
dsn := m.Username + ":" + m.Password + "@tcp(" + m.Path + ")/" + m.Dbname + "?" + m.Config
mysqlConfig := mysql.Config{
DSN: dsn, // DSN data source name
DefaultStringSize: 191, // string 类型字段的默认长度
DisableDatetimePrecision: true, // 禁用 datetime 精度,MySQL 5.6 之前的数据库不支持
DontSupportRenameIndex: true, // 重命名索引时采用删除并新建的方式,MySQL 5.7 之前的数据库和 MariaDB 不支持重命名索引
DontSupportRenameColumn: true, // 用 `change` 重命名列,MySQL 8 之前的数据库和 MariaDB 不支持重命名列
SkipInitializeWithVersion: false, // 根据版本自动配置
}
gormConfig := config(m.LogMode)
if global.GVA_DB, err = gorm.Open(mysql.New(mysqlConfig), gormConfig); err != nil {
global.GVA_LOG.Error("MySQL启动异常", zap.Any("err", err))
os.Exit(0)
} else {
GormDBTables(global.GVA_DB)
sqlDB, _ := global.GVA_DB.DB()
sqlDB.SetMaxIdleConns(m.MaxIdleConns)
sqlDB.SetMaxOpenConns(m.MaxOpenConns)
}
}
// GormPostgreSql 初始化PostgreSql数据库
func GormPostgreSql() {
p := global.GVA_CONFIG.Postgresql
dsn := "user=" + p.Username + " password=" + p.Password + " dbname=" + p.Dbname + " port=" + p.Port + " " + p.Config
postgresConfig := postgres.Config{
DSN: dsn, // DSN data source name
PreferSimpleProtocol: p.PreferSimpleProtocol, // 禁用隐式 prepared statement
}
gormConfig := config(p.Logger)
if global.GVA_DB, err = gorm.Open(postgres.New(postgresConfig), gormConfig); err != nil {
global.GVA_LOG.Error("PostgreSql启动异常", zap.Any("err", err))
os.Exit(0)
} else {
GormDBTables(global.GVA_DB)
sqlDB, _ := global.GVA_DB.DB()
sqlDB.SetMaxIdleConns(p.MaxIdleConns)
sqlDB.SetMaxOpenConns(p.MaxOpenConns)
}
}
// GormSqlite 初始化Sqlite数据库 sqlite需要gcc支持 windows用户需要自行安装gcc 如需使用打开注释即可
//func GormSqlite() {
// s := global.GVA_CONFIG.Sqlite
// gormConfig := config(s.Logger)
// if global.GVA_DB, err = gorm.Open(sqlite.Open(s.Path), gormConfig); err != nil {
// global.GVA_LOG.Error("Sqlite启动异常", zap.Any("err", err))
// os.Exit(0)
// } else {
// GormDBTables(global.GVA_DB)
// sqlDB, _ := global.GVA_DB.DB()
// sqlDB.SetMaxIdleConns(s.MaxIdleConns)
// sqlDB.SetMaxOpenConns(s.MaxOpenConns)
// }
//}
// GormSqlServer 初始化SqlServer数据库
func GormSqlServer() {
ss := global.GVA_CONFIG.Sqlserver
dsn := "sqlserver://" + ss.Username + ":" + ss.Password + "@" + ss.Path + "?database=gorm"
if global.GVA_DB, err = gorm.Open(sqlserver.Open(dsn), &gorm.Config{}); err != nil {
global.GVA_LOG.Error("SqlServer启动异常", zap.Any("err", err))
os.Exit(0)
} else {
GormDBTables(global.GVA_DB)
sqlDB, _ := global.GVA_DB.DB()
sqlDB.SetMaxIdleConns(ss.MaxIdleConns)
sqlDB.SetMaxOpenConns(ss.MaxOpenConns)
}
}
// config 根据配置决定是否开启日志
func config(mod bool) (c *gorm.Config) {
if mod {
c = &gorm.Config{
Logger: logger.Default.LogMode(logger.Info),
DisableForeignKeyConstraintWhenMigrating: true,
}
} else {
c = &gorm.Config{
Logger: logger.Default.LogMode(logger.Silent),
DisableForeignKeyConstraintWhenMigrating: true,
}
}
return
}
-22
View File
@@ -1,22 +0,0 @@
package initialize
import (
"gin-vue-admin/global"
"github.com/jinzhu/gorm"
_ "github.com/jinzhu/gorm/dialects/mysql"
"os"
)
// 初始化数据库并产生数据库全局变量
func Mysql() {
admin := global.GVA_CONFIG.Mysql
if db, err := gorm.Open("mysql", admin.Username+":"+admin.Password+"@("+admin.Path+")/"+admin.Dbname+"?"+admin.Config); err != nil {
global.GVA_LOG.Error("MySQL启动异常", err)
os.Exit(0)
} else {
global.GVA_DB = db
global.GVA_DB.DB().SetMaxIdleConns(admin.MaxIdleConns)
global.GVA_DB.DB().SetMaxOpenConns(admin.MaxOpenConns)
global.GVA_DB.LogMode(admin.LogMode)
}
}
-23
View File
@@ -1,23 +0,0 @@
package initialize
import (
"github.com/gin-gonic/gin"
"github.com/jinzhu/gorm"
)
type Plug interface {
InitRouter([2]*gin.RouterGroup) error
InitModel(*gorm.DB) error
}
func InstallPlug(db *gorm.DB, router [2]*gin.RouterGroup, p Plug) (err error) {
err = p.InitModel(db)
if err != nil {
return err
}
err = p.InitRouter(router)
if err != nil {
return err
}
return nil
}
+3 -2
View File
@@ -3,6 +3,7 @@ package initialize
import (
"gin-vue-admin/global"
"github.com/go-redis/redis"
"go.uber.org/zap"
)
func Redis() {
@@ -14,9 +15,9 @@ func Redis() {
})
pong, err := client.Ping().Result()
if err != nil {
global.GVA_LOG.Error(err)
global.GVA_LOG.Error("redis connect ping failed, err:", zap.Any("err", err))
} else {
global.GVA_LOG.Info("redis connect ping response:", pong)
global.GVA_LOG.Info("redis connect ping response:", zap.String("pong",pong))
global.GVA_REDIS = client
}
}
+7 -3
View File
@@ -8,19 +8,22 @@ import (
"github.com/gin-gonic/gin"
"github.com/swaggo/gin-swagger"
"github.com/swaggo/gin-swagger/swaggerFiles"
"net/http"
)
// 初始化总路由
func Routers() *gin.Engine {
var Router = gin.Default()
// 为用户头像和文件提供静态地址
Router.StaticFS(global.GVA_CONFIG.LocalUpload.FilePath, http.Dir(global.GVA_CONFIG.LocalUpload.FilePath))
// Router.Use(middleware.LoadTls()) // 打开就能玩https了
global.GVA_LOG.Debug("use middleware logger")
global.GVA_LOG.Info("use middleware logger")
// 跨域
Router.Use(middleware.Cors())
global.GVA_LOG.Debug("use middleware cors")
global.GVA_LOG.Info("use middleware cors")
Router.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))
global.GVA_LOG.Debug("register swagger handler")
global.GVA_LOG.Info("register swagger handler")
// 方便统一添加路由组前缀 多服务器上线使用
ApiGroup := Router.Group("")
router.InitUserRouter(ApiGroup) // 注册用户路由
@@ -39,6 +42,7 @@ func Routers() *gin.Engine {
router.InitSysDictionaryDetailRouter(ApiGroup) // 字典详情管理
router.InitSysDictionaryRouter(ApiGroup) // 字典管理
router.InitSysOperationRecordRouter(ApiGroup) // 操作记录
router.InitEmailRouter(ApiGroup) // 邮件相关路由
global.GVA_LOG.Info("router register success")
return Router
-23
View File
@@ -1,23 +0,0 @@
package initialize
// sqlite需要gcc支持 windows用户需要自行安装gcc 如需使用打开注释即可
// 感谢 sqlitet提供者 [rikugun] 作者github: https://github.com/rikugun
// import (
// "fmt"
// "gin-vue-admin/global"
// "github.com/jinzhu/gorm"
// _ "github.com/jinzhu/gorm/dialects/sqlite"
// )
//
// // 初始化数据库并产生数据库全局变量
// func Sqlite() {
// admin := global.GVA_CONFIG.Sqlite
// if db, err := gorm.Open("sqlite3", fmt.Sprintf("%s?%s", admin.Path,admin.Config)); err != nil {
// global.GVA_LOG.Error("DEFAULTDB数据库启动异常", err)
// } else {
// global.GVA_DB = db
// global.GVA_DB.LogMode(admin.LogMode)
// }
// }
+6 -10
View File
@@ -3,8 +3,8 @@ package main
import (
"gin-vue-admin/core"
"gin-vue-admin/global"
"gin-vue-admin/gva/init_data"
"gin-vue-admin/initialize"
//"runtime"
)
// @title Swagger Example API
@@ -15,17 +15,13 @@ import (
// @name x-token
// @BasePath /
func main() {
switch global.GVA_CONFIG.System.DbType {
case "mysql":
initialize.Mysql()
// case "sqlite":
// initialize.Sqlite() // sqlite需要gcc支持 windows用户需要自行安装gcc 如需使用打开注释即可
default:
initialize.Mysql()
initialize.Gorm()
if global.GVA_CONFIG.System.NeedInitData {
init_data.InitData() // 通过配置文件初始化数据 默认为 false 首次运行需要将 ./config.yaml中 system下的 need-init-data 修改为true
}
initialize.DBTables()
// 程序结束前关闭数据库链接
defer global.GVA_DB.Close()
db, _ := global.GVA_DB.DB()
defer db.Close()
core.RunWindowsServer()
}
+2 -1
View File
@@ -21,7 +21,8 @@ func CasbinHandler() gin.HandlerFunc {
sub := waitUse.AuthorityId
e := service.Casbin()
// 判断策略中是否存在
if global.GVA_CONFIG.System.Env == "develop" || e.Enforce(sub, obj, act) {
success, _ := e.Enforce(sub, obj, act)
if global.GVA_CONFIG.System.Env == "develop" || success {
c.Next()
} else {
response.Result(response.ERROR, gin.H{}, "权限不足", c)
+2 -1
View File
@@ -9,7 +9,8 @@ import (
func Cors() gin.HandlerFunc {
return func(c *gin.Context) {
method := c.Request.Method
c.Header("Access-Control-Allow-Origin", "*")
origin := c.Request.Header.Get("Origin")
c.Header("Access-Control-Allow-Origin", origin)
c.Header("Access-Control-Allow-Headers", "Content-Type,AccessToken,X-CSRF-Token, Authorization, Token,X-Token,X-User-Id\"")
c.Header("Access-Control-Allow-Methods", "POST, GET, OPTIONS,DELETE,PUT")
c.Header("Access-Control-Expose-Headers", "Content-Length, Access-Control-Allow-Origin, Access-Control-Allow-Headers, Content-Type")
+60
View File
@@ -0,0 +1,60 @@
package middleware
import (
"gin-vue-admin/global"
"github.com/gin-gonic/gin"
"go.uber.org/zap"
"net"
"net/http"
"net/http/httputil"
"os"
"runtime/debug"
"strings"
)
// GinRecovery recover掉项目可能出现的panic,并使用zap记录相关日志
func GinRecovery(stack bool) gin.HandlerFunc {
return func(c *gin.Context) {
defer func() {
if err := recover(); err != nil {
// Check for a broken connection, as it is not really a
// condition that warrants a panic stack trace.
var brokenPipe bool
if ne, ok := err.(*net.OpError); ok {
if se, ok := ne.Err.(*os.SyscallError); ok {
if strings.Contains(strings.ToLower(se.Error()), "broken pipe") || strings.Contains(strings.ToLower(se.Error()), "connection reset by peer") {
brokenPipe = true
}
}
}
httpRequest, _ := httputil.DumpRequest(c.Request, false)
if brokenPipe {
global.GVA_LOG.Error(c.Request.URL.Path,
zap.Any("error", err),
zap.String("request", string(httpRequest)),
)
// If the connection is dead, we can't write a status to it.
_ = c.Error(err.(error)) // nolint: errcheck
c.Abort()
return
}
if stack {
global.GVA_LOG.Error("[Recovery from panic]",
zap.Any("error", err),
zap.String("request", string(httpRequest)),
zap.String("stack", string(debug.Stack())),
)
} else {
global.GVA_LOG.Error("[Recovery from panic]",
zap.Any("error", err),
zap.String("request", string(httpRequest)),
)
}
c.AbortWithStatus(http.StatusInternalServerError)
}
}()
c.Next()
}
}
+2 -1
View File
@@ -9,6 +9,7 @@ import (
"gin-vue-admin/service"
"github.com/dgrijalva/jwt-go"
"github.com/gin-gonic/gin"
"go.uber.org/zap"
"strconv"
"time"
)
@@ -57,7 +58,7 @@ func JWTAuth() gin.HandlerFunc {
if global.GVA_CONFIG.System.UseMultipoint {
err,RedisJwtToken := service.GetRedisJWT(newClaims.Username)
if err!=nil {
global.GVA_LOG.Error(err)
global.GVA_LOG.Error("get redis jwt failed", zap.Any("err", err))
}else{
service.JsonInBlacklist(model.JwtBlacklist{Jwt: RedisJwtToken})
//当之前的取成功时才进行拉黑操作
+4 -3
View File
@@ -6,6 +6,7 @@ import (
"gin-vue-admin/model"
"gin-vue-admin/service"
"github.com/gin-gonic/gin"
"go.uber.org/zap"
"io/ioutil"
"net/http"
"strconv"
@@ -19,7 +20,7 @@ func OperationRecord() gin.HandlerFunc {
var err error
body, err = ioutil.ReadAll(c.Request.Body)
if err != nil {
global.GVA_LOG.Error("read body from request error:", err)
global.GVA_LOG.Error("read body from request error:", zap.Any("err", err))
} else {
c.Request.Body = ioutil.NopCloser(bytes.NewBuffer(body))
}
@@ -34,7 +35,7 @@ func OperationRecord() gin.HandlerFunc {
Path: c.Request.URL.Path,
Agent: c.Request.UserAgent(),
Body: string(body),
UserId: userId,
UserID: userId,
}
writer := responseBodyWriter{
ResponseWriter: c.Writer,
@@ -52,7 +53,7 @@ func OperationRecord() gin.HandlerFunc {
record.Resp = writer.body.String()
if err := service.CreateSysOperationRecord(record); err != nil {
global.GVA_LOG.Error("create operation record error:", err)
global.GVA_LOG.Error("create operation record error:", zap.Any("err", err))
}
}
}
+2 -2
View File
@@ -1,7 +1,7 @@
package model
import (
"github.com/jinzhu/gorm"
"gorm.io/gorm"
)
// file struct, 文件结构体
@@ -18,7 +18,7 @@ type ExaFile struct {
// file chunk struct, 切片结构体
type ExaFileChunk struct {
gorm.Model
ExaFileId uint
ExaFileID uint
FileChunkNumber int
FileChunkPath string
}
+6 -6
View File
@@ -1,14 +1,14 @@
package model
import (
"github.com/jinzhu/gorm"
"gorm.io/gorm"
)
type ExaCustomer struct {
gorm.Model
CustomerName string `json:"customerName" form:"customerName" gorm:"comment:'客户名'"`
CustomerPhoneData string `json:"customerPhoneData" form:"customerPhoneData" gorm:"comment:'客户手机号'"`
SysUserID uint `json:"sysUserId" form:"sysUserId" gorm:"comment:'管理ID'"`
SysUserAuthorityID string `json:"sysUserAuthorityID" form:"sysUserAuthorityID" gorm:"comment:'管理角色ID'"`
SysUser SysUser `json:"sysUser" form:"sysUser" gorm:"comment:'管理详情'"`
CustomerName string `json:"customerName" form:"customerName" gorm:"comment:客户名"`
CustomerPhoneData string `json:"customerPhoneData" form:"customerPhoneData" gorm:"comment:客户手机号"`
SysUserID uint `json:"sysUserId" form:"sysUserId" gorm:"comment:管理ID"`
SysUserAuthorityID string `json:"sysUserAuthorityID" form:"sysUserAuthorityID" gorm:"comment:管理角色ID"`
SysUser SysUser `json:"sysUser" form:"sysUser" gorm:"comment:管理详情"`
}
+5 -5
View File
@@ -1,13 +1,13 @@
package model
import (
"github.com/jinzhu/gorm"
"gorm.io/gorm"
)
type ExaFileUploadAndDownload struct {
gorm.Model
Name string `json:"name" gorm:"comment:'文件名'"`
Url string `json:"url" gorm:"comment:'文件地址'"`
Tag string `json:"tag" gorm:"comment:'文件标签'"`
Key string `json:"key" gorm:"comment:'编号'"`
Name string `json:"name" gorm:"comment:文件名"`
Url string `json:"url" gorm:"comment:文件地址"`
Tag string `json:"tag" gorm:"comment:文件标签"`
Key string `json:"key" gorm:"comment:编号"`
}
+9 -9
View File
@@ -1,13 +1,13 @@
package model
type ExaSimpleUploader struct {
ChunkNumber string `json:"chunkNumber" gorm:"comment:'当前切片标记'"`
CurrentChunkSize string `json:"currentChunkSize" gorm:"comment:'当前切片容量'"`
CurrentChunkPath string `json:"currentChunkPath" gorm:"comment:'切片本地路径'"`
TotalSize string `json:"totalSize" gorm:"comment:'总容量'"`
Identifier string `json:"identifier" gorm:"comment:'文件标识(md5)'"`
Filename string `json:"filename" gorm:"comment:'文件名'"`
TotalChunks string `json:"totalChunks" gorm:"comment:'切片总数'"`
IsDone bool `json:"isDone" gorm:"comment:'是否上传完成'"`
FilePath string `json:"filePath" gorm:"comment:'文件本地路径'"`
ChunkNumber string `json:"chunkNumber" gorm:"comment:当前切片标记"`
CurrentChunkSize string `json:"currentChunkSize" gorm:"comment:当前切片容量"`
CurrentChunkPath string `json:"currentChunkPath" gorm:"comment:切片本地路径"`
TotalSize string `json:"totalSize" gorm:"comment:总容量"`
Identifier string `json:"identifier" gorm:"comment:文件标识(md5)"`
Filename string `json:"filename" gorm:"comment:文件名"`
TotalChunks string `json:"totalChunks" gorm:"comment:切片总数"`
IsDone bool `json:"isDone" gorm:"comment:是否上传完成"`
FilePath string `json:"filePath" gorm:"comment:文件本地路径"`
}
+1 -1
View File
@@ -2,7 +2,7 @@ package response
type PageResult struct {
List interface{} `json:"list"`
Total int `json:"total"`
Total int64 `json:"total"`
Page int `json:"page"`
PageSize int `json:"pageSize"`
}
+5 -5
View File
@@ -1,13 +1,13 @@
package model
import (
"github.com/jinzhu/gorm"
"gorm.io/gorm"
)
type SysApi struct {
gorm.Model
Path string `json:"path" gorm:"comment:'api路径'"`
Description string `json:"description" gorm:"comment:'api中文描述'"`
ApiGroup string `json:"apiGroup" gorm:"comment:'api组'"`
Method string `json:"method" gorm:"default:'POST'" gorm:"comment:'方法'"`
Path string `json:"path" gorm:"comment:api路径"`
Description string `json:"description" gorm:"comment:api中文描述"`
ApiGroup string `json:"apiGroup" gorm:"comment:api组"`
Method string `json:"method" gorm:"default:POST" gorm:"comment:方法"`
}
+5 -5
View File
@@ -8,10 +8,10 @@ type SysAuthority struct {
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt *time.Time `sql:"index"`
AuthorityId string `json:"authorityId" gorm:"not null;unique;primary_key" gorm:"comment:'角色ID'"`
AuthorityName string `json:"authorityName" gorm:"comment:'角色名'"`
ParentId string `json:"parentId" gorm:"comment:'父角色ID'"`
DataAuthorityId []SysAuthority `json:"dataAuthorityId" gorm:"many2many:sys_data_authority_id;association_jointable_foreignkey:data_authority_id"`
Children []SysAuthority `json:"children"`
AuthorityId string `json:"authorityId" gorm:"not null;unique;primary_key;comment:角色ID;size:90"`
AuthorityName string `json:"authorityName" gorm:"comment:角色名"`
ParentId string `json:"parentId" gorm:"comment:父角色ID"`
DataAuthorityId []SysAuthority `json:"dataAuthorityId" gorm:"many2many:sys_data_authority_id"`
Children []SysAuthority `json:"children" gorm:"-"`
SysBaseMenus []SysBaseMenu `json:"menus" gorm:"many2many:sys_authority_menus;"`
}
+4 -4
View File
@@ -2,10 +2,10 @@ package model
type SysMenu struct {
SysBaseMenu
MenuId string `json:"menuId" gorm:"comment:'菜单ID'"`
AuthorityId string `json:"-" gorm:"comment:'角色ID'"`
Children []SysMenu `json:"children"`
Parameters []SysBaseMenuParameter `json:"parameters" gorm:"ForeignKey:MenuId"`
MenuId string `json:"menuId" gorm:"comment:菜单ID"`
AuthorityId string `json:"-" gorm:"comment:角色ID"`
Children []SysMenu `json:"children" gorm:"-"`
Parameters []SysBaseMenuParameter `json:"parameters" gorm:"foreignKey:SysBaseMenuID;references:MenuId"`
}
func (s SysMenu) TableName() string {
+14 -14
View File
@@ -1,34 +1,34 @@
package model
import (
"github.com/jinzhu/gorm"
"gorm.io/gorm"
)
type SysBaseMenu struct {
gorm.Model
MenuLevel uint `json:"-"`
ParentId string `json:"parentId" gorm:"comment:'父菜单ID'"`
Path string `json:"path" gorm:"comment:'路由path'"`
Name string `json:"name" gorm:"comment:'路由name'"`
Hidden bool `json:"hidden" gorm:"comment:'是否在列表隐藏'"`
Component string `json:"component" gorm:"comment:'对应前端文件路径'"`
Sort int `json:"sort" gorm:"comment:'排序标记'"`
Meta `json:"meta" gorm:"comment:'附加属性'"`
ParentId string `json:"parentId" gorm:"comment:父菜单ID"`
Path string `json:"path" gorm:"comment:路由path"`
Name string `json:"name" gorm:"comment:路由name"`
Hidden bool `json:"hidden" gorm:"comment:是否在列表隐藏"`
Component string `json:"component" gorm:"comment:对应前端文件路径"`
Sort int `json:"sort" gorm:"comment:排序标记"`
Meta `json:"meta" gorm:"comment:附加属性"`
SysAuthoritys []SysAuthority `json:"authoritys" gorm:"many2many:sys_authority_menus;"`
Children []SysBaseMenu `json:"children"`
Children []SysBaseMenu `json:"children" gorm:"-"`
Parameters []SysBaseMenuParameter `json:"parameters"`
}
type Meta struct {
KeepAlive bool `json:"keepAlive" gorm:"comment:'是否缓存'"`
DefaultMenu bool `json:"defaultMenu" gorm:"comment:'是否是基础路由(开发中)'"`
Title string `json:"title" gorm:"comment:'菜单名'"`
Icon string `json:"icon" gorm:"comment:'菜单图标'"`
KeepAlive bool `json:"keepAlive" gorm:"comment:是否缓存"`
DefaultMenu bool `json:"defaultMenu" gorm:"comment:是否是基础路由(开发中)"`
Title string `json:"title" gorm:"comment:菜单名"`
Icon string `json:"icon" gorm:"comment:菜单图标"`
}
type SysBaseMenuParameter struct {
gorm.Model
SysBaseMenuId uint
SysBaseMenuID uint
Type string `json:"type" gorm:"commit:'地址栏携带参数为params还是query'"`
Key string `json:"key" gorm:"commit:'地址栏携带参数的key'"`
Value string `json:"value" gorm:"commit:'地址栏携带参数的值'"`
+1 -2
View File
@@ -1,8 +1,7 @@
package model
type CasbinModel struct {
ID uint `json:"id" gorm:"column:_id"`
Ptype string `json:"ptype" gorm:"column:ptype"`
Ptype string `json:"ptype" gorm:"column:p_type"`
AuthorityId string `json:"rolename" gorm:"column:v0"`
Path string `json:"path" gorm:"column:v1"`
Method string `json:"method" gorm:"column:v2"`
+5 -5
View File
@@ -2,15 +2,15 @@
package model
import (
"github.com/jinzhu/gorm"
"gorm.io/gorm"
)
// 如果含有time.Time 请自行import time包
type SysDictionary struct {
gorm.Model
Name string `json:"name" form:"name" gorm:"column:name;comment:'字典名(中)'"`
Type string `json:"type" form:"type" gorm:"column:type;comment:'字典名(英)'"`
Status *bool `json:"status" form:"status" gorm:"column:status;comment:'状态'"`
Desc string `json:"desc" form:"desc" gorm:"column:desc;comment:'描述'"`
Name string `json:"name" form:"name" gorm:"column:name;comment:字典名(中)"`
Type string `json:"type" form:"type" gorm:"column:type;comment:字典名(英)"`
Status *bool `json:"status" form:"status" gorm:"column:status;comment:状态"`
Desc string `json:"desc" form:"desc" gorm:"column:desc;comment:描述"`
SysDictionaryDetails []SysDictionaryDetail `json:"sysDictionaryDetails" form:"sysDictionaryDetails"`
}
+8 -8
View File
@@ -2,15 +2,15 @@
package model
import (
"github.com/jinzhu/gorm"
"gorm.io/gorm"
)
// 如果含有time.Time 请自行import time包
type SysDictionaryDetail struct {
gorm.Model
Label string `json:"label" form:"label" gorm:"column:label;comment:'展示值'"`
Value int `json:"value" form:"value" gorm:"column:value;comment:'字典值'"`
Status *bool `json:"status" form:"status" gorm:"column:status;comment:'启用状态'"`
Sort int `json:"sort" form:"sort" gorm:"column:sort;comment:'排序标记'"`
SysDictionaryID int `json:"sysDictionaryID" form:"sysDictionaryID" gorm:"column:sys_dictionary_id;comment:'关联标记'"`
}
gorm.Model
Label string `json:"label" form:"label" gorm:"column:label;comment:展示值"`
Value int `json:"value" form:"value" gorm:"column:value;comment:字典值"`
Status *bool `json:"status" form:"status" gorm:"column:status;comment:启用状态"`
Sort int `json:"sort" form:"sort" gorm:"column:sort;comment:排序标记"`
SysDictionaryID int `json:"sysDictionaryID" form:"sysDictionaryID" gorm:"column:sys_dictionary_id;comment:关联标记"`
}
+2 -2
View File
@@ -1,10 +1,10 @@
package model
import (
"github.com/jinzhu/gorm"
"gorm.io/gorm"
)
type JwtBlacklist struct {
gorm.Model
Jwt string `gorm:"type:text;comment:'jwt'"`
Jwt string `gorm:"type:text;comment:jwt"`
}
+11 -11
View File
@@ -2,22 +2,22 @@
package model
import (
"github.com/jinzhu/gorm"
"gorm.io/gorm"
"time"
)
// 如果含有time.Time 请自行import time包
type SysOperationRecord struct {
gorm.Model
Ip string `json:"ip" form:"ip" gorm:"column:ip;comment:'请求ip'"`
Method string `json:"method" form:"method" gorm:"column:method;comment:''"`
Path string `json:"path" form:"path" gorm:"column:path;comment:''"`
Status int `json:"status" form:"status" gorm:"column:status;comment:''"`
Latency time.Duration `json:"latency" form:"latency" gorm:"column:latency;comment:''"`
Agent string `json:"agent" form:"agent" gorm:"column:agent;comment:''"`
ErrorMessage string `json:"error_message" form:"error_message" gorm:"column:error_message;comment:''"`
Body string `json:"body" form:"body" gorm:"column:body;comment:'请求Body'"`
Resp string `json:"resp" form:"resp" gorm:"column:resp;comment:'响应Body'"`
UserId int `json:"user_id" form:"user_id" gorm:"column:user_id;comment:''"`
Ip string `json:"ip" form:"ip" gorm:"column:ip;comment:请求ip"`
Method string `json:"method" form:"method" gorm:"column:method;comment:请求方法"`
Path string `json:"path" form:"path" gorm:"column:path;comment:请求路径"`
Status int `json:"status" form:"status" gorm:"column:status;comment:请求状态"`
Latency time.Duration `json:"latency" form:"latency" gorm:"column:latency;comment:延迟"`
Agent string `json:"agent" form:"agent" gorm:"column:agent;comment:代理"`
ErrorMessage string `json:"error_message" form:"error_message" gorm:"column:error_message;comment:错误信息"`
Body string `json:"body" form:"body" gorm:"column:body;comment:请求Body"`
Resp string `json:"resp" form:"resp" gorm:"type:longtext;column:resp;comment:响应Body"`
UserID int `json:"user_id" form:"user_id" gorm:"column:user_id;comment:用户id"`
User SysUser `json:"user"`
}
+8 -8
View File
@@ -1,17 +1,17 @@
package model
import (
"github.com/jinzhu/gorm"
"github.com/satori/go.uuid"
"gorm.io/gorm"
)
type SysUser struct {
gorm.Model
UUID uuid.UUID `json:"uuid" gorm:"comment:'用户UUID'"`
Username string `json:"userName" gorm:"comment:'用户登录名'"`
Password string `json:"-" gorm:"comment:'用户登录密码'"`
NickName string `json:"nickName" gorm:"default:'系统用户';comment:'用户昵称'" `
HeaderImg string `json:"headerImg" gorm:"default:'http://qmplusimg.henrongyi.top/head.png';comment:'用户头像'"`
Authority SysAuthority `json:"authority" gorm:"ForeignKey:AuthorityId;AssociationForeignKey:AuthorityId;comment:'用户角色'"`
AuthorityId string `json:"authorityId" gorm:"default:888;comment:'用户角色ID'"`
UUID uuid.UUID `json:"uuid" gorm:"comment:用户UUID"`
Username string `json:"userName" gorm:"comment:用户登录名"`
Password string `json:"-" gorm:"comment:用户登录密码"`
NickName string `json:"nickName" gorm:"default:系统用户;comment:用户昵称" `
HeaderImg string `json:"headerImg" gorm:"default:http://qmplusimg.henrongyi.top/head.png;comment:用户头像"`
Authority SysAuthority `json:"authority" gorm:"foreignKey:AuthorityId;references:AuthorityId;comment:用户角色"`
AuthorityId string `json:"authorityId" gorm:"default:888;comment:用户角色ID"`
}
+11 -11
View File
@@ -1,25 +1,25 @@
package model
import (
"github.com/jinzhu/gorm"
"gorm.io/gorm"
)
// 工作流属性表
type SysWorkflow struct {
gorm.Model
WorkflowNickName string `json:"workflowNickName" gorm:"comment:'工作流中文名称'"` // 工作流名称
WorkflowName string `json:"workflowName" gorm:"comment:'工作流英文名称'"` // 工作流英文id
WorkflowDescription string `json:"workflowDescription" gorm:"comment:'工作流描述'"` // 工作流描述
WorkflowStepInfo []SysWorkflowStepInfo `json:"workflowStep" gorm:"comment:'工作流步骤'"` // 工作流步骤
WorkflowNickName string `json:"workflowNickName" gorm:"comment:工作流中文名称"` // 工作流名称
WorkflowName string `json:"workflowName" gorm:"comment:工作流英文名称"` // 工作流英文id
WorkflowDescription string `json:"workflowDescription" gorm:"comment:工作流描述"` // 工作流描述
WorkflowStepInfo []SysWorkflowStepInfo `json:"workflowStep" gorm:"comment:工作流步骤"` // 工作流步骤
}
// 工作流状态表
type SysWorkflowStepInfo struct {
gorm.Model
SysWorkflowID uint `json:"workflowID" gorm:"comment:'所属工作流ID'"` // 所属工作流ID
IsStrat bool `json:"isStrat" gorm:"comment:'是否是开始流节点'"` // 是否是开始流节点
StepName string `json:"stepName" gorm:"comment:'工作流节点名称'"` // 工作流名称
StepNo float64 `json:"stepNo" gorm:"comment:'步骤id (第几步)'"` // 步骤id (第几步)
StepAuthorityID string `json:"stepAuthorityID" gorm:"comment:'操作者级别id'"` // 操作者级别id
IsEnd bool `json:"isEnd" gorm:"comment:'是否是完结流节点'"` // 是否是完结流节点
SysWorkflowID uint `json:"workflowID" gorm:"comment:所属工作流ID"` // 所属工作流ID
IsStart bool `json:"isStart" gorm:"comment:是否是开始流节点"` // 是否是开始流节点
StepName string `json:"stepName" gorm:"comment:工作流节点名称"` // 工作流名称
StepNo float64 `json:"stepNo" gorm:"comment:步骤id (第几步)"` // 步骤id (第几步)
StepAuthorityID string `json:"stepAuthorityID" gorm:"comment:操作者级别id"` // 操作者级别id
IsEnd bool `json:"isEnd" gorm:"comment:是否是完结流节点"` // 是否是完结流节点
}
+7 -7
View File
@@ -1,14 +1,14 @@
package model
import "github.com/jinzhu/gorm"
import "gorm.io/gorm"
// 工作流流转表
type SysWorkFlowProcess struct {
gorm.Model
ApplicationID uint `json:"applicationID" gorm:"comment:'当前工作流所属申请的ID'"` // 当前工作流所属申请的ID
CurrentNode string `json:"currentNode" gorm:"comment:'当前进度节点'"` // 当前进度节点
HistoricalNode string `json:"historicalNode" gorm:"comment:'上一个进度节点'"` // 上一个进度节点
CurrentUser string `json:"currentUser" gorm:"comment:'当前进度操作人'"` // 当前进度操作人
HistoricalUser string `json:"historicalUser" gorm:"comment:'上一个进度的操作人'"` // 上一个进度的操作人
State bool `json:"state" gorm:"comment:'状态 是否是正在进行的状态'"` // 状态 是否是正在进行的状态
ApplicationID uint `json:"applicationID" gorm:"comment:当前工作流所属申请的ID"` // 当前工作流所属申请的ID
CurrentNode string `json:"currentNode" gorm:"comment:当前进度节点"` // 当前进度节点
HistoricalNode string `json:"historicalNode" gorm:"comment:上一个进度节点"` // 上一个进度节点
CurrentUser string `json:"currentUser" gorm:"comment:当前进度操作人"` // 当前进度操作人
HistoricalUser string `json:"historicalUser" gorm:"comment:上一个进度的操作人"` // 上一个进度的操作人
State bool `json:"state" gorm:"comment:是否是正在进行的状态"` // 状态 是否是正在进行的状态
}
+3 -3
View File
@@ -2,16 +2,16 @@
package model
import (
"github.com/jinzhu/gorm"
"gorm.io/gorm"
)
// 如果含有time.Time 请自行import time包
type {{.StructName}} struct {
gorm.Model {{- range .Fields}}
{{- if eq .FieldType "bool" }}
{{.FieldName}} *{{.FieldType}} `json:"{{.FieldJson}}" form:"{{.FieldJson}}" gorm:"column:{{.ColumnName}};comment:'{{.Comment}}'{{- if .DataType -}};type:{{.DataType}}{{- if .DataTypeLong -}}({{.DataTypeLong}}){{- end -}}{{- end -}}"`
{{.FieldName}} *{{.FieldType}} `json:"{{.FieldJson}}" form:"{{.FieldJson}}" gorm:"column:{{.ColumnName}};comment:{{.Comment}}{{- if .DataType -}};type:{{.DataType}}{{- if .DataTypeLong -}}({{.DataTypeLong}}){{- end -}};{{- if .DataTypeLong -}}size:{{.DataTypeLong}};{{- end -}}{{- end -}}"`
{{- else }}
{{.FieldName}} {{.FieldType}} `json:"{{.FieldJson}}" form:"{{.FieldJson}}" gorm:"column:{{.ColumnName}};comment:'{{.Comment}}'{{- if .DataType -}};type:{{.DataType}}{{- if .DataTypeLong -}}({{.DataTypeLong}}){{- end -}}{{- end -}}"`
{{.FieldName}} {{.FieldType}} `json:"{{.FieldJson}}" form:"{{.FieldJson}}" gorm:"column:{{.ColumnName}};comment:{{.Comment}}{{- if .DataType -}};type:{{.DataType}}{{- if .DataTypeLong -}}({{.DataTypeLong}}){{- end -}};{{- if .DataTypeLong -}}size:{{.DataTypeLong}};{{- end -}}{{- end -}}"`
{{- end }} {{- end }}
}
+2 -2
View File
@@ -35,7 +35,7 @@ func Delete{{.StructName}}({{.Abbreviation}} model.{{.StructName}}) (err error)
// @return error
func Delete{{.StructName}}ByIds(ids request.IdsReq) (err error) {
err = global.GVA_DB.Delete(&[]model.{{.StructName}}{},"id in (?)",ids.Ids).Error
err = global.GVA_DB.Delete(&[]model.{{.StructName}}{},"id in ?",ids.Ids).Error
return err
}
@@ -68,7 +68,7 @@ func Get{{.StructName}}(id uint) (err error, {{.Abbreviation}} model.{{.StructNa
// @param info PageInfo
// @return error
func Get{{.StructName}}InfoList(info request.{{.StructName}}Search) (err error, list interface{}, total int) {
func Get{{.StructName}}InfoList(info request.{{.StructName}}Search) (err error, list interface{}, total int64) {
limit := info.PageSize
offset := info.PageSize * (info.Page - 1)
// 创建db
-1
View File
@@ -14,6 +14,5 @@ func InitCasbinRouter(Router *gin.RouterGroup) {
{
CasbinRouter.POST("updateCasbin", v1.UpdateCasbin)
CasbinRouter.POST("getPolicyPathByAuthorityId", v1.GetPolicyPathByAuthorityId)
CasbinRouter.GET("casbinTest/:pathParam", v1.CasbinTest)
}
}
+14
View File
@@ -0,0 +1,14 @@
package router
import (
"gin-vue-admin/api/v1"
"gin-vue-admin/middleware"
"github.com/gin-gonic/gin"
)
func InitEmailRouter(Router *gin.RouterGroup) {
UserRouter := Router.Group("email").Use(middleware.JWTAuth()).Use(middleware.CasbinHandler())
{
UserRouter.POST("emailTest", v1.EmailTest) // 发送测试邮件
}
}
-1
View File
@@ -14,7 +14,6 @@ func InitSysOperationRecordRouter(Router *gin.RouterGroup) {
SysOperationRecordRouter.POST("createSysOperationRecord", v1.CreateSysOperationRecord) // 新建SysOperationRecord
SysOperationRecordRouter.DELETE("deleteSysOperationRecord", v1.DeleteSysOperationRecord) // 删除SysOperationRecord
SysOperationRecordRouter.DELETE("deleteSysOperationRecordByIds", v1.DeleteSysOperationRecordByIds) // 批量删除SysOperationRecord
SysOperationRecordRouter.PUT("updateSysOperationRecord", v1.UpdateSysOperationRecord) // 更新SysOperationRecord
SysOperationRecordRouter.GET("findSysOperationRecord", v1.FindSysOperationRecord) // 根据ID获取SysOperationRecord
SysOperationRecordRouter.GET("getSysOperationRecordList", v1.GetSysOperationRecordList) // 获取SysOperationRecord列表
+1 -1
View File
@@ -13,9 +13,9 @@ func InitUserRouter(Router *gin.RouterGroup) {
Use(middleware.OperationRecord())
{
UserRouter.POST("changePassword", v1.ChangePassword) // 修改密码
UserRouter.POST("uploadHeaderImg", v1.UploadHeaderImg) // 上传头像
UserRouter.POST("getUserList", v1.GetUserList) // 分页获取用户列表
UserRouter.POST("setUserAuthority", v1.SetUserAuthority) // 设置用户权限
UserRouter.DELETE("deleteUser", v1.DeleteUser) // 删除用户
UserRouter.PUT("setUserInfo", v1.SetUserInfo) // 设置用户信息
}
}
+9 -25
View File
@@ -1,8 +1,10 @@
package service
import (
"errors"
"gin-vue-admin/global"
"gin-vue-admin/model"
"gorm.io/gorm"
)
// @title FindOrCreateFile
@@ -20,16 +22,15 @@ func FindOrCreateFile(fileMd5 string, fileName string, chunkTotal int) (err erro
cfile.FileMd5 = fileMd5
cfile.FileName = fileName
cfile.ChunkTotal = chunkTotal
notHaveSameMd5Finish := global.GVA_DB.Where("file_md5 = ? AND is_finish = ?", fileMd5, true).First(&file).RecordNotFound()
if notHaveSameMd5Finish {
if errors.Is(global.GVA_DB.Where("file_md5 = ? AND is_finish = ?", fileMd5, true).First(&file).Error, gorm.ErrRecordNotFound) {
err = global.GVA_DB.Where("file_md5 = ? AND file_name = ?", fileMd5, fileName).Preload("ExaFileChunk").FirstOrCreate(&file, cfile).Error
return err, file
} else {
cfile.IsFinish = true
cfile.FilePath = file.FilePath
err = global.GVA_DB.Create(&cfile).Error
return err, cfile
}
cfile.IsFinish = true
cfile.FilePath = file.FilePath
err = global.GVA_DB.Create(&cfile).Error
return err, cfile
}
// @title CreateFileChunk
@@ -43,29 +44,12 @@ func FindOrCreateFile(fileMd5 string, fileName string, chunkTotal int) (err erro
func CreateFileChunk(id uint, fileChunkPath string, fileChunkNumber int) error {
var chunk model.ExaFileChunk
chunk.FileChunkPath = fileChunkPath
chunk.ExaFileId = id
chunk.ExaFileID = id
chunk.FileChunkNumber = fileChunkNumber
err := global.GVA_DB.Create(&chunk).Error
return err
}
// @title FileCreateComplete
// @description file creation, 文件合成完成
// @auth (2020/04/05 20:22)
// @param fileMd5 string
// @param fileName string
// @param filePath string
// @return error
func FileCreateComplete(fileMd5 string, fileName string, filePath string) error {
var file model.ExaFile
upDateFile := make(map[string]interface{})
upDateFile["FilePath"] = filePath
upDateFile["IsFinish"] = true
err := global.GVA_DB.Where("file_md5 = ? AND file_name = ?", fileMd5, fileName).First(&file).Updates(upDateFile).Error
return err
}
// @title DeleteFileChunk
// @description delete a chuck of the file, 删除文件切片记录
// @auth (2020/04/05 20:22)
+3 -3
View File
@@ -58,7 +58,7 @@ func GetExaCustomer(id uint) (err error, customer model.ExaCustomer) {
// @param info PageInfo
// @return error
func GetCustomerInfoList(sysUserAuthorityID string, info request.PageInfo) (err error, list interface{}, total int) {
func GetCustomerInfoList(sysUserAuthorityID string, info request.PageInfo) (err error, list interface{}, total int64) {
limit := info.PageSize
offset := info.PageSize * (info.Page - 1)
db := global.GVA_DB.Model(&model.ExaCustomer{})
@@ -70,11 +70,11 @@ func GetCustomerInfoList(sysUserAuthorityID string, info request.PageInfo) (err
dataId = append(dataId, v.AuthorityId)
}
var CustomerList []model.ExaCustomer
err = db.Where("sys_user_authority_id in (?)", dataId).Count(&total).Error
err = db.Where("sys_user_authority_id in ?", dataId).Count(&total).Error
if err != nil {
return err, CustomerList, total
} else {
err = db.Limit(limit).Offset(offset).Preload("SysUser").Where("sys_user_authority_id in (?)", dataId).Find(&CustomerList).Error
err = db.Limit(limit).Offset(offset).Preload("SysUser").Where("sys_user_authority_id in ?", dataId).Find(&CustomerList).Error
}
return err, CustomerList, total
}
+1 -1
View File
@@ -48,7 +48,7 @@ func DeleteFile(file model.ExaFileUploadAndDownload) error {
// @return list error
// @return total error
func GetFileRecordInfoList(info request.PageInfo) (err error, list interface{}, total int) {
func GetFileRecordInfoList(info request.PageInfo) (err error, list interface{}, total int64) {
limit := info.PageSize
offset := info.PageSize * (info.Page - 1)
db := global.GVA_DB
+4 -3
View File
@@ -1,9 +1,11 @@
package service
import (
"errors"
"fmt"
"gin-vue-admin/global"
"gin-vue-admin/model"
"gorm.io/gorm"
"io/ioutil"
"os"
"strconv"
@@ -17,7 +19,7 @@ func SaveChunk(uploader model.ExaSimpleUploader) (err error) {
// 检查文件是否已经上传过
func CheckFileMd5(md5 string) (err error, uploads []model.ExaSimpleUploader, isDone bool) {
err = global.GVA_DB.Find(&uploads, "identifier = ? AND is_done = ?", md5, false).Error
isDone = global.GVA_DB.First(&model.ExaSimpleUploader{}, "identifier = ? AND is_done = ?", md5, true).RecordNotFound()
isDone = errors.Is(global.GVA_DB.First(&model.ExaSimpleUploader{}, "identifier = ? AND is_done = ?", md5, true).Error, gorm.ErrRecordNotFound)
return err, uploads, !isDone
}
@@ -26,8 +28,7 @@ func MergeFileMd5(md5 string, fileName string) (err error) {
finishDir := "./finish/"
dir := "./chunk/" + md5
//如果文件上传成功 不做后续操作 通知成功即可
notFinish := global.GVA_DB.First(&model.ExaSimpleUploader{}, "identifier = ? AND is_done = ?", md5, true).RecordNotFound()
if !notFinish {
if !errors.Is(global.GVA_DB.First(&model.ExaSimpleUploader{}, "identifier = ? AND is_done = ?", md5, true).Error, gorm.ErrRecordNotFound) {
return nil
}
+4 -2
View File
@@ -1,8 +1,10 @@
package service
import (
"errors"
"gin-vue-admin/global"
"gin-vue-admin/model"
"gorm.io/gorm"
"time"
)
@@ -25,7 +27,7 @@ func JsonInBlacklist(jwtList model.JwtBlacklist) (err error) {
// @return err error
func IsBlacklist(jwt string) bool {
isNotFound := global.GVA_DB.Where("jwt = ?", jwt).First(&model.JwtBlacklist{}).RecordNotFound()
isNotFound := errors.Is(global.GVA_DB.Where("jwt = ?", jwt).First(&model.JwtBlacklist{}).Error, gorm.ErrRecordNotFound)
return !isNotFound
}
@@ -50,7 +52,7 @@ func GetRedisJWT(userName string) (err error, redisJWT string) {
func SetRedisJWT(jwt string, userName string) (err error) {
// 此处过期时间等于jwt过期时间
timer := 60*60*24*7*time.Second
timer := 60 * 60 * 24 * 7 * time.Second
err = global.GVA_REDIS.Set(userName, jwt, timer).Err()
return err
}
+7 -10
View File
@@ -5,6 +5,7 @@ import (
"gin-vue-admin/global"
"gin-vue-admin/model"
"gin-vue-admin/model/request"
"gorm.io/gorm"
)
// @title CreateApi
@@ -14,13 +15,10 @@ import (
// @return error
func CreateApi(api model.SysApi) (err error) {
findOne := global.GVA_DB.Where("path = ? AND method = ?", api.Path, api.Method).Find(&model.SysApi{}).Error
if findOne == nil {
if !errors.Is(global.GVA_DB.Where("path = ? AND method = ?", api.Path, api.Method).First(&model.SysApi{}).Error, gorm.ErrRecordNotFound){
return errors.New("存在相同api")
} else {
err = global.GVA_DB.Create(&api).Error
}
return err
return global.GVA_DB.Create(&api).Error
}
// @title DeleteApi
@@ -46,7 +44,7 @@ func DeleteApi(api model.SysApi) (err error) {
// @return list interface{}
// @return total int
func GetAPIInfoList(api model.SysApi, info request.PageInfo, order string, desc bool) (err error, list interface{}, total int) {
func GetAPIInfoList(api model.SysApi, info request.PageInfo, order string, desc bool) (err error, list interface{}, total int64) {
limit := info.PageSize
offset := info.PageSize * (info.Page - 1)
db := global.GVA_DB.Model(&model.SysApi{})
@@ -81,9 +79,9 @@ func GetAPIInfoList(api model.SysApi, info request.PageInfo, order string, desc
} else {
OrderStr = order
}
err = db.Order(OrderStr, true).Find(&apiList).Error
err = db.Order(OrderStr).Find(&apiList).Error
} else {
err = db.Order("api_group", true).Find(&apiList).Error
err = db.Order("api_group").Find(&apiList).Error
}
}
return err, apiList, total
@@ -124,8 +122,7 @@ func UpdateApi(api model.SysApi) (err error) {
err = global.GVA_DB.Where("id = ?", api.ID).First(&oldA).Error
if oldA.Path != api.Path || oldA.Method != api.Method {
flag := global.GVA_DB.Where("path = ? AND method = ?", api.Path, api.Method).Find(&model.SysApi{}).RecordNotFound()
if !flag {
if !errors.Is(global.GVA_DB.Where("path = ? AND method = ?", api.Path, api.Method).First(&model.SysApi{}).Error, gorm.ErrRecordNotFound) {
return errors.New("存在相同api路径")
}
}
+14 -17
View File
@@ -6,6 +6,7 @@ import (
"gin-vue-admin/model"
"gin-vue-admin/model/request"
"gin-vue-admin/model/response"
"gorm.io/gorm"
"strconv"
)
@@ -18,8 +19,7 @@ import (
func CreateAuthority(auth model.SysAuthority) (err error, authority model.SysAuthority) {
var authorityBox model.SysAuthority
notHas := global.GVA_DB.Where("authority_id = ?", auth.AuthorityId).Find(&authorityBox).RecordNotFound()
if !notHas {
if !errors.Is(global.GVA_DB.Where("authority_id = ?", auth.AuthorityId).First(&authorityBox).Error, gorm.ErrRecordNotFound) {
return errors.New("存在相同角色id"), auth
}
err = global.GVA_DB.Create(&auth).Error
@@ -35,8 +35,7 @@ func CreateAuthority(auth model.SysAuthority) (err error, authority model.SysAut
func CopyAuthority(copyInfo response.SysAuthorityCopyResponse) (err error, authority model.SysAuthority) {
var authorityBox model.SysAuthority
notHas := global.GVA_DB.Where("authority_id = ?", copyInfo.Authority.AuthorityId).Find(&authorityBox).RecordNotFound()
if !notHas {
if !errors.Is(global.GVA_DB.Where("authority_id = ?", copyInfo.Authority.AuthorityId).First(&authorityBox).Error, gorm.ErrRecordNotFound) {
return errors.New("存在相同角色id"), authority
}
copyInfo.Authority.Children = []model.SysAuthority{}
@@ -78,19 +77,17 @@ func UpdateAuthority(auth model.SysAuthority) (err error, authority model.SysAut
// 删除角色
func DeleteAuthority(auth *model.SysAuthority) (err error) {
err = global.GVA_DB.Where("authority_id = ?", auth.AuthorityId).Find(&model.SysUser{}).Error
if err == nil {
err = errors.New("此角色有用户正在使用禁止删除")
return
if !errors.Is(global.GVA_DB.Where("authority_id = ?", auth.AuthorityId).First(&model.SysUser{}).Error, gorm.ErrRecordNotFound) {
return errors.New("此角色有用户正在使用禁止删除")
}
err = global.GVA_DB.Where("parent_id = ?", auth.AuthorityId).Find(&model.SysAuthority{}).Error
if err == nil {
err = errors.New("此角色存在子角色不允许删除")
return
if !errors.Is(global.GVA_DB.Where("parent_id = ?", auth.AuthorityId).First(&model.SysAuthority{}).Error, gorm.ErrRecordNotFound) {
return errors.New("此角色存在子角色不允许删除")
}
db := global.GVA_DB.Preload("SysBaseMenus").Where("authority_id = ?", auth.AuthorityId).First(auth).Unscoped().Delete(auth)
db := global.GVA_DB.Preload("SysBaseMenus").Where("authority_id = ?", auth.AuthorityId).First(auth)
err = db.Unscoped().Delete(auth).Error
if len(auth.SysBaseMenus) > 0 {
err = db.Association("SysBaseMenus").Delete(auth.SysBaseMenus).Error
err = global.GVA_DB.Model(auth).Association("SysBaseMenus").Delete(auth.SysBaseMenus)
//err = db.Association("SysBaseMenus").Delete(&auth)
} else {
err = db.Error
}
@@ -105,7 +102,7 @@ func DeleteAuthority(auth *model.SysAuthority) (err error) {
// @return error
// 分页获取数据
func GetAuthorityInfoList(info request.PageInfo) (err error, list interface{}, total int) {
func GetAuthorityInfoList(info request.PageInfo) (err error, list interface{}, total int64) {
limit := info.PageSize
offset := info.PageSize * (info.Page - 1)
db := global.GVA_DB
@@ -140,7 +137,7 @@ func GetAuthorityInfo(auth model.SysAuthority) (err error, sa model.SysAuthority
func SetDataAuthority(auth model.SysAuthority) error {
var s model.SysAuthority
global.GVA_DB.Preload("DataAuthorityId").First(&s, "authority_id = ?", auth.AuthorityId)
err := global.GVA_DB.Model(&s).Association("DataAuthorityId").Replace(&auth.DataAuthorityId).Error
err := global.GVA_DB.Model(&s).Association("DataAuthorityId").Replace(&auth.DataAuthorityId)
return err
}
@@ -153,7 +150,7 @@ func SetDataAuthority(auth model.SysAuthority) error {
func SetMenuAuthority(auth *model.SysAuthority) error {
var s model.SysAuthority
global.GVA_DB.Preload("SysBaseMenus").First(&s, "authority_id = ?", auth.AuthorityId)
err := global.GVA_DB.Model(&s).Association("SysBaseMenus").Replace(&auth.SysBaseMenus).Error
err := global.GVA_DB.Model(&s).Association("SysBaseMenus").Replace(&auth.SysBaseMenus)
return err
}
+5 -5
View File
@@ -4,6 +4,7 @@ import (
"errors"
"gin-vue-admin/global"
"gin-vue-admin/model"
"gorm.io/gorm"
)
// @title DeleteBaseMenu
@@ -19,7 +20,7 @@ func DeleteBaseMenu(id float64) (err error) {
db := global.GVA_DB.Preload("SysAuthoritys").Where("id = ?", id).First(&menu).Delete(&menu)
err = global.GVA_DB.Delete(&model.SysBaseMenuParameter{}, "sys_base_menu_id = ?", id).Error
if len(menu.SysAuthoritys) > 0 {
err = db.Association("SysAuthoritys").Delete(menu.SysAuthoritys).Error
err = global.GVA_DB.Model(&menu).Association("SysAuthoritys").Delete(&menu.SysAuthoritys)
} else {
err = db.Error
}
@@ -51,14 +52,13 @@ func UpdateBaseMenu(menu model.SysBaseMenu) (err error) {
db := global.GVA_DB.Where("id = ?", menu.ID).Find(&oldMenu)
if oldMenu.Name != menu.Name {
notSame := global.GVA_DB.Where("id <> ? AND name = ?", menu.ID, menu.Name).First(&model.SysBaseMenu{}).RecordNotFound()
if !notSame {
if !errors.Is(global.GVA_DB.Where("id <> ? AND name = ?", menu.ID, menu.Name).First(&model.SysBaseMenu{}).Error, gorm.ErrRecordNotFound) {
global.GVA_LOG.Debug("存在相同name修改失败")
return errors.New("存在相同name修改失败")
}
}
err = db.Updates(upDateMap).Association("Parameters").Replace(menu.Parameters).Error
global.GVA_LOG.Debug("菜单修改时候,关联菜单err:%v", err)
err = global.GVA_DB.Delete(&model.SysBaseMenuParameter{}, "sys_base_menu_id = ?", menu.ID).Error
err = db.Updates(upDateMap).Error
return err
}
+16 -23
View File
@@ -5,9 +5,10 @@ import (
"gin-vue-admin/global"
"gin-vue-admin/model"
"gin-vue-admin/model/request"
"github.com/casbin/casbin"
"github.com/casbin/casbin/util"
gormadapter "github.com/casbin/gorm-adapter"
"github.com/casbin/casbin/v2"
gormadapter "github.com/casbin/gorm-adapter/v3"
_ "github.com/go-sql-driver/mysql"
"strings"
)
@@ -20,33 +21,24 @@ import (
func UpdateCasbin(authorityId string, casbinInfos []request.CasbinInfo) error {
ClearCasbin(0, authorityId)
rules := [][]string{}
for _, v := range casbinInfos {
cm := model.CasbinModel{
ID: 0,
Ptype: "p",
AuthorityId: authorityId,
Path: v.Path,
Method: v.Method,
}
addflag := AddCasbin(cm)
if addflag == false {
return errors.New("存在相同api,添加失败,请联系管理员")
}
rules = append(rules, []string{cm.AuthorityId, cm.Path, cm.Method})
}
e := Casbin()
success, _ := e.AddPolicies(rules)
if success == false {
return errors.New("存在相同api,添加失败,请联系管理员")
}
return nil
}
// @title AddCasbin
// @description add casbin authority, 添加权限
// @auth (2020/04/05 20:22)
// @param cm model.CasbinModel
// @return bool
func AddCasbin(cm model.CasbinModel) bool {
e := Casbin()
return e.AddPolicy(cm.AuthorityId, cm.Path, cm.Method)
}
// @title UpdateCasbinApi
// @description update casbin apis, API更新随动
// @auth (2020/04/05 20:22)
@@ -57,8 +49,7 @@ func AddCasbin(cm model.CasbinModel) bool {
// @return error
func UpdateCasbinApi(oldPath string, newPath string, oldMethod string, newMethod string) error {
var cs []model.CasbinModel
err := global.GVA_DB.Table("casbin_rule").Where("v1 = ? AND v2 = ?", oldPath, oldMethod).Find(&cs).Updates(map[string]string{
err := global.GVA_DB.Table("casbin_rule").Model(&model.CasbinModel{}).Where("v1 = ? AND v2 = ?", oldPath, oldMethod).Updates(map[string]interface{}{
"v1": newPath,
"v2": newMethod,
}).Error
@@ -92,7 +83,8 @@ func GetPolicyPathByAuthorityId(authorityId string) (pathMaps []request.CasbinIn
func ClearCasbin(v int, p ...string) bool {
e := Casbin()
return e.RemoveFilteredPolicy(v, p...)
success, _ := e.RemoveFilteredPolicy(v, p...)
return success
}
@@ -101,8 +93,9 @@ func ClearCasbin(v int, p ...string) bool {
// @auth (2020/04/05 20:22)
func Casbin() *casbin.Enforcer {
a := gormadapter.NewAdapterByDB(global.GVA_DB)
e := casbin.NewEnforcer(global.GVA_CONFIG.Casbin.ModelPath, a)
admin := global.GVA_CONFIG.Mysql
a, _ := gormadapter.NewAdapter(global.GVA_CONFIG.System.DbType, admin.Username+":"+admin.Password+"@("+admin.Path+")/"+admin.Dbname, true)
e, _ := casbin.NewEnforcer(global.GVA_CONFIG.Casbin.ModelPath, a)
e.AddFunction("ParamsMatch", ParamsMatchFunc)
_ = e.LoadPolicy()
return e
+7 -6
View File
@@ -5,6 +5,7 @@ import (
"gin-vue-admin/global"
"gin-vue-admin/model"
"gin-vue-admin/model/request"
"gorm.io/gorm"
)
// @title CreateSysDictionary
@@ -14,7 +15,7 @@ import (
// @return err error
func CreateSysDictionary(sysDictionary model.SysDictionary) (err error) {
if (!global.GVA_DB.First(&model.SysDictionary{}, "type = ?", sysDictionary.Type).RecordNotFound()) {
if (!errors.Is(global.GVA_DB.First(&model.SysDictionary{}, "type = ?", sysDictionary.Type).Error, gorm.ErrRecordNotFound)) {
return errors.New("存在相同的type,不允许创建")
}
err = global.GVA_DB.Create(&sysDictionary).Error
@@ -28,7 +29,7 @@ func CreateSysDictionary(sysDictionary model.SysDictionary) (err error) {
// @return error
func DeleteSysDictionary(sysDictionary model.SysDictionary) (err error) {
err = global.GVA_DB.Delete(sysDictionary).Related(&sysDictionary.SysDictionaryDetails).Delete(&sysDictionary.SysDictionaryDetails).Error
err = global.GVA_DB.Delete(sysDictionary).Delete(&sysDictionary.SysDictionaryDetails).Error
return err
}
@@ -50,11 +51,11 @@ func UpdateSysDictionary(sysDictionary *model.SysDictionary) (err error) {
if dict.Type == sysDictionary.Type {
err = db.Updates(sysDictionaryMap).Error
} else {
if (!global.GVA_DB.First(&model.SysDictionary{}, "type = ?", sysDictionary.Type).RecordNotFound()) {
if (!errors.Is(global.GVA_DB.First(&model.SysDictionary{}, "type = ?", sysDictionary.Type).Error, gorm.ErrRecordNotFound)) {
return errors.New("存在相同的type,不允许创建")
} else {
err = db.Updates(sysDictionaryMap).Error
}
err = db.Updates(sysDictionaryMap).Error
}
return err
}
@@ -77,7 +78,7 @@ func GetSysDictionary(Type string, Id uint) (err error, sysDictionary model.SysD
// @param info PageInfo
// @return error
func GetSysDictionaryInfoList(info request.SysDictionarySearch) (err error, list interface{}, total int) {
func GetSysDictionaryInfoList(info request.SysDictionarySearch) (err error, list interface{}, total int64) {
limit := info.PageSize
offset := info.PageSize * (info.Page - 1)
// 创建db

Some files were not shown because too many files have changed in this diff Show More