Compare commits

..
516 Commits
Author SHA1 Message Date
奇淼(piexlmax 7342788339 Update README.md 2020-11-28 11:58:51 +08:00
QM303176530 15d6ff0144 Merge branches 'develop' and 'gva_gormv2_dev' of https://github.com/flipped-aurora/gin-vue-admin into gva_gormv2_dev 2020-11-28 11:47:18 +08:00
QM303176530 9718b16e39 增加首页教学入口 2020-11-28 11:43:54 +08:00
QM303176530 e80842207f 更新版本号 2020-11-28 11:07:54 +08:00
QM303176530 58585afdf6 默认丢出false 防止前端warnning 2020-11-28 11:06:44 +08:00
QM303176530 a3eee91cef 修复几个模板错误 2020-11-28 10:34:30 +08:00
QM303176530 9098eaf22e Merge branches 'gva_gormv2_dev' and 'gva_workflow' of https://github.com/flipped-aurora/gin-vue-admin into gva_gormv2_dev 2020-11-28 10:10:48 +08:00
pixel 2d3b039f71 Merge branch 'gva_gormv2_dev' of https://github.com/flipped-aurora/gin-vue-admin into develop 2020-11-25 17:18:35 +08:00
pixel 864c468440 命名修复 2020-11-25 17:18:07 +08:00
pixel cc295fad32 文件名更改 2020-11-25 17:11:11 +08:00
奇淼(piexlmax b4e0dc800d Merge pull request #290 from songzhibin97/develop
优化基础库的一些错误处理
2020-11-25 03:09:50 -06:00
奇淼(piexlmax 5e7078e3a6 Merge branch 'develop' into develop 2020-11-25 02:55:43 -06:00
songzhibin97 2829d7b653 优化基础库的一些错误处理 2020-11-25 16:24:20 +08:00
songzhibin97 ba834592a7 修改了zipfiles.go中ZipFiles函数可能会造成的goroutine泄露 2020-11-25 15:50:28 +08:00
奇淼(piexlmax 1607e6a0a9 Merge pull request #284 from xiaopenggithub/master
前端发布优化,部分组件使用cdn资源,不打包
2020-11-24 23:21:00 -06:00
奇淼(piexlmax f936029d59 Merge pull request #283 from SliverHorn/sliverhorn_dev
gorm日志收集进log功能
2020-11-24 23:09:16 -06:00
曾阿牛 9f1552f508 前端发布优化,部分组件使用cdn资源,不打包 2020-11-25 02:38:39 +08:00
SliverHorn c00d465709 新增切片越界的检查 2020-11-24 21:17:07 +08:00
SliverHorn c2a55931bb 自定义gorm的logger 2020-11-24 19:27:16 +08:00
1319612909 1357e22330 手机端ui 2020-11-24 18:11:32 +08:00
pixel 8a282cd743 增加工作流步骤查看 2020-11-24 18:07:14 +08:00
1319612909 6ca7f62ce6 手机端ui 2020-11-24 17:20:12 +08:00
pixel 6ee7ad8069 隐藏0.01未完成功能 2020-11-24 16:59:31 +08:00
pixel 307b1bf496 工作流前端垃圾代码剔除 2020-11-24 16:08:40 +08:00
pixel 61f50980e1 增加自动化产生的工作流form页面 2020-11-24 16:07:55 +08:00
pixel 5293222ac0 包容网关 流转参数模式设定 2020-11-24 14:57:30 +08:00
奇淼(piexlmax 411a21d0f7 Merge pull request #282 from golyu/master
[utils/zipfiles.go]: 解决for循环中使用defer可能会造成的内存泄露问题
2020-11-23 21:46:11 -06:00
pixel 8a5d788e73 增加排他网关和包容网关 2020-11-24 11:33:16 +08:00
golyu 3e48fa55c7 [utils/zipfiles.go]: 解决for循环中使用defer可能会造成的内存泄露问题 2020-11-23 20:45:15 +08:00
pixel cd735e727e 普通工作流流动完成 2020-11-23 18:15:51 +08:00
pixel 1eb69c696a 普通工作流流动完成 2020-11-23 18:15:23 +08:00
pixel 8208ccf5a3 Merge branch 'master' of https://github.com/flipped-aurora/gin-vue-admin into gva_workflow
 Conflicts:
	server/initialize/router.go
	server/router/sys_workflow.go
2020-11-23 18:14:43 +08:00
pixel 1591944756 普通工作流流动完成 2020-11-23 18:13:46 +08:00
songzhibin97 8e87ae55a9 Revert "pointChange"
This reverts commit fb4dba1616.
2020-11-23 12:02:18 +08:00
QM303176530 85fce8f01e 中间件包导入 2020-11-22 23:27:33 +08:00
QM303176530 7475bc56c9 中间件不再记录二进制文件类型日志 2020-11-22 23:19:36 +08:00
QM303176530 7af2dffb7a 日志记录中间件位置转移 2020-11-22 23:12:50 +08:00
QM303176530 15f2d149df 修改了自动化代码自动化创建api会被禁止的bug 2020-11-22 23:09:34 +08:00
QM303176530 c09924dbdc 修改了自动化代码自动化创建api会被禁止的bug 2020-11-22 23:09:20 +08:00
songzhibin97 1ddd6dac4f pointChange 2020-11-22 18:05:51 +08:00
SliverHorn b45afe9669 当用户不存在时,拉黑前端的token 2020-11-21 11:18:13 +08:00
SliverHorn 1e85e03713 utils备注统一化, 删除多余的函数 2020-11-21 11:07:05 +08:00
SliverHorn 43eef673bc 修复自杀操作bug 2020-11-21 01:26:01 +08:00
SliverHorn 41ce276dbd 添加utils函数注释 2020-11-21 01:15:26 +08:00
SliverHorn d6e078f3d6 路由组鉴权优化 2020-11-20 23:26:17 +08:00
pixel a487266f5b 数据动态查找以及动态赋值方法变更 2020-11-19 17:24:05 +08:00
pixel 0286d56e9c 增加获取工作流详细页面信息的接口和对应调用 2020-11-18 18:06:31 +08:00
songzhibin97 4c2f43b4cf f 2020-11-17 21:20:18 +08:00
songzhibin97 9bbcb62505 热更++ 2020-11-17 20:50:14 +08:00
pixel 5bb840c1ce 调整初始化数据 2020-11-17 18:05:22 +08:00
pixel 8f221b6b0b Merge branch 'gva_gormv2_dev' of https://github.com/flipped-aurora/gin-vue-admin into gva_workflow
 Conflicts:
	server/cmd/datas/init.go
2020-11-17 17:41:12 +08:00
pixel ac4398873b 增加初始化参数 2020-11-17 17:35:23 +08:00
pixel 2fad9035d3 增加工作流使用方法 接口
增加工作流通用完成方法
增加查询待办
查询我发起的工作流功能
增加测试示例
2020-11-17 16:41:43 +08:00
SliverHorn ef03c95f40 锁定gorm-adapter/v3的版本为v3.0.2 2020-11-17 11:50:19 +08:00
songzhibin97 eb7a6411d1 bug log++ 2020-11-16 22:12:44 +08:00
songzhibin97 e02e70ff26 c2 2020-11-16 21:31:38 +08:00
songzhibin97 b6843e04d5 Update cmd_Task.go 2020-11-16 21:07:57 +08:00
songzhibin97 5e4c82b94a 热更新
修改bug 优化增加回显
2020-11-16 20:55:47 +08:00
SliverHorn 1f411ec6e0 From->Form 2020-11-16 20:40:51 +08:00
SliverHorn a890bd2d38 解决err覆盖问题 2020-11-16 18:38:20 +08:00
1319612909 7a47f59945 Merge branch 'gva_gormv2_dev' of https://github.com/flipped-aurora/gin-vue-admin into gva_gormv2_dev 2020-11-16 14:11:19 +08:00
1319612909 830c2cf29b menu 三级菜单样式 2020-11-16 14:11:10 +08:00
SliverHorn 86593943d3 更新获取工作路径代码,修改go.mod的go版本为1.14 2020-11-16 00:11:21 +08:00
songzhibin97 7c188fa7ce 热更新
缺少具体配置 监控文件以及防抖
2020-11-15 15:51:16 +08:00
SliverHorn a9432b5d9c 更新自动化代码api层代码混入service层代码 2020-11-14 23:15:57 +08:00
songzhibin97 0bebb7f65b Update cmd_Task.go
c2
2020-11-14 19:36:22 +08:00
songzhibin97 6536caed75 Hotreload
Hotreload1
2020-11-14 19:21:06 +08:00
pixel 4863b2c5be 添加流转接口 设计流转表 2020-11-12 18:21:03 +08:00
pixel 86afc0ddf4 Merge branch 'gva_gormv2_dev' of https://github.com/flipped-aurora/gin-vue-admin into gva_workflow 2020-11-11 11:34:19 +08:00
pixel bf6f469dad 修复可能产生数据库锁死的事务错误
修复菜单参数无法修改的错误
2020-11-11 10:59:46 +08:00
pixel 68677e1b5b 增加友好提示 2020-11-11 09:59:18 +08:00
pixel f4709f00ab 工作流起始接口以及动态获取view功能 2020-11-10 17:39:29 +08:00
1319612909 8392398b1c Merge branch 'gva_gormv2_dev' of https://github.com/flipped-aurora/gin-vue-admin into gva_gormv2_dev 2020-11-10 14:06:19 +08:00
1319612909 b4355b4399 css整理 2020-11-10 14:06:03 +08:00
pixel b12bbc74ff 更新workflow函数说明 清理无用workflow文件 2020-11-10 11:50:24 +08:00
pixel d3dbca0e00 Merge branch 'gva_gormv2_dev' of https://github.com/flipped-aurora/gin-vue-admin into gva_workflow
 Conflicts:
	server/api/v1/sys_work_flow.go
	server/service/sys_workflow.go
2020-11-10 11:43:56 +08:00
pixel 81e0e4dde7 menu携带参数问题修复 2020-11-10 11:33:28 +08:00
SliverHorn fba9ab0ae6 删除FindSysDictionary的校验 2020-11-09 21:24:23 +08:00
QM303176530 e18518b4d3 版本号更新 2020-11-08 14:47:04 +08:00
QM303176530 074a7145d2 Merge branches 'gva_gormv2_dev' and 'master' of https://github.com/flipped-aurora/gin-vue-admin into gva_gormv2_dev 2020-11-08 14:42:47 +08:00
QM303176530 46372f0e6c Merge remote-tracking branch 'origin/gva_gormv2_dev' into gva_gormv2_dev 2020-11-08 14:20:19 +08:00
QM303176530 1acd2e3238 前端代码优化 修改密码迁移至个人中心内部 2020-11-08 14:15:06 +08:00
SliverHorn a2e7827aa8 模板文件server/sevice层备注的规范化 2020-11-08 14:02:07 +08:00
SliverHorn ac71aafe83 service层注释规范化 2020-11-08 13:34:17 +08:00
SliverHorn 0b1cc913d9 service层注释规范化 2020-11-08 13:30:12 +08:00
QM303176530 84b967ae82 增强自动化代码使用体验 2020-11-08 13:01:28 +08:00
QM303176530 cf9002a377 自动化代码体验优化 2020-11-08 12:47:55 +08:00
songzhibin97 829fa4dac5 re 2020-11-08 11:08:02 +08:00
songzhibin97 5529d5f46d change2 2020-11-08 10:58:17 +08:00
songzhibin97 08e9c6b38a 优化auto 2020-11-08 07:52:15 +08:00
SliverHorn 5c94c73004 修改模板文件,规范化代码 2020-11-08 03:15:27 +08:00
SliverHorn 8ebb1fda77 修复中间件导包错误及代码优化,更新swagger文档 2020-11-08 02:54:14 +08:00
SliverHorn 96380bd031 server/api/v1层代码swagger备注错误修改及代码优化 2020-11-08 02:43:11 +08:00
SliverHorn c342e63e63 修复一些问题 2020-11-07 22:50:01 +08:00
SliverHorn 4fa43c232d Merge branch 'gva_gormv2_dev' of https://github.com/flipped-aurora/gin-vue-admin into gva_gormv2_dev 2020-11-07 18:28:19 +08:00
SliverHorn d07cbc8783 修复bug 2020-11-07 18:28:04 +08:00
SliverHorn f7667ad3e1 修复bug 2020-11-07 18:24:07 +08:00
krank666 5fe66b7abc Merge branch 'gva_gormv2_dev' of https://github.com/flipped-aurora/gin-vue-admin into gva_gormv2_dev 2020-11-07 18:22:32 +08:00
krank666 856c09c38d 个人中心优化 2020-11-07 18:22:26 +08:00
v_zhibsong b947f043ee change2 2020-11-07 18:03:23 +08:00
SliverHorn ebd515f057 add addAutoMoveFile 2020-11-07 17:32:58 +08:00
v_zhibsong 636faaf93b Update file_operations.go 2020-11-07 16:00:55 +08:00
v_zhibsong ed1c6c7a47 change filepath 2020-11-07 16:00:09 +08:00
v_zhibsong e4340641ad change filemove 2020-11-07 15:35:12 +08:00
SliverHorn 35738cfda8 add autoMoveFilePath 字段,修改utils的fileoperations.go-> file_operations.go 2020-11-07 15:09:11 +08:00
SliverHorn e749adaa10 修改初始化数据时的colume->column 2020-11-07 11:54:04 +08:00
SliverHorn 26a1a89d60 Merge branch 'gva_gormv2_dev' of https://github.com/flipped-aurora/gin-vue-admin into gva_gormv2_dev 2020-11-07 11:38:41 +08:00
SliverHorn 2daa65f00d 修复错别单词colume -> column, 删除tag中多余的; 2020-11-07 11:38:36 +08:00
v_zhibsong d2579d390c add filemove
add filemove
2020-11-07 11:32:45 +08:00
SliverHorn 261e34a5c2 添加自动移动文件的boo; 2020-11-07 11:04:54 +08:00
SliverHorn b4bad21e35 修改v1/sys_menu.go的备注错误及代码优化 2020-11-07 10:40:00 +08:00
SliverHorn 699f53e8b2 修复配置文件设置 zap: show-line: true 没有打印文件及行号的bug 2020-11-07 09:07:57 +08:00
SliverHorn 820c9f733f 优化server/api/v1/exa_customer.go的代码及备注错误 2020-11-07 00:32:31 +08:00
SliverHorn 99bd217080 修改错误单词,新增从gin.Context获取用户id,uuid,authority_id的函数 2020-11-07 00:14:36 +08:00
SliverHorn c86c05f380 修改server/api/v1/sys_user.go的备注错误 2020-11-06 23:45:33 +08:00
pixel 544901bf45 Merge remote-tracking branch 'origin/gva_gormv2_dev' into gva_gormv2_dev 2020-11-06 18:51:51 +08:00
pixel 8db0e2fb06 连接池最大链接数修改为100 2020-11-06 16:54:23 +08:00
pixel c5ed47192e 自动化代码中 批量删除功能增加未选择条目时提醒功能 2020-11-06 16:52:06 +08:00
klausY 3d56cb7eb2 修改scrollBar样式 2020-11-06 16:09:30 +08:00
pixel ada8818960 增加自动化生成表单功能,修改自动化生成文件的文件夹名称更加规范化,css样式调整。 2020-11-06 16:01:09 +08:00
pixel 2f97f4b979 自动填充API功能不再需要手动清理垃圾数据 2020-11-06 14:42:26 +08:00
pixel 0a4e81138a css增加悬浮效果 2020-11-05 17:25:10 +08:00
1319612909 c61350643a index css 2020-11-03 22:28:04 +08:00
1319612909 9f59275652 css 2020-11-05 10:03:01 +08:00
1319612909 1da644b96a css 2020-11-04 18:23:32 +08:00
1319612909 1de825ee43 css 2020-11-04 17:58:14 +08:00
1319612909 2e18f3f5e1 css aside 2020-11-04 11:55:23 +08:00
1319612909 653f73b989 更换ip 2020-11-03 18:12:23 +08:00
1319612909 9c5b9729d8 aside + header css 2020-11-03 18:05:44 +08:00
1319612909 6950e493f2 aside + header css 2020-11-03 18:04:59 +08:00
1319612909 286f0b74da css 整理 2020-11-02 21:59:13 +08:00
pixel a1191abc43 自动化代码不再记录日志 2020-11-02 11:19:29 +08:00
pixel 75799b81e8 Merge branch 'gva_gormv2_dev' of https://github.com/flipped-aurora/gin-vue-admin into gva_gormv2_dev 2020-11-02 11:02:51 +08:00
pixel 511a187f49 当自动化代码报错时不下载 2020-11-02 11:02:25 +08:00
QM303176530 01ecfcdf8d Merge branches 'gva_gormv2_dev' and 'master' of https://github.com/flipped-aurora/gin-vue-admin into gva_gormv2_dev 2020-11-01 19:58:29 +08:00
SliverHorn 14a55fcb83 修改断点续传的提交方式代码 2020-11-01 19:50:34 +08:00
奇淼(piexlmax 49c146b3dc Update README.md 2020-10-31 16:17:03 +08:00
QM303176530 e2c5988bea 修复自动化代码bug 2020-10-31 15:09:13 +08:00
QM303176530 4828dc3dae 增加节点视图配置 2020-10-31 14:00:12 +08:00
QM303176530 8413f0e8d3 Merge branches 'gva_gormv2_dev' and 'gva_workflow' of https://github.com/flipped-aurora/gin-vue-admin into gva_workflow 2020-10-31 00:11:55 +08:00
QM303176530 3d2e9ef063 Merge branches 'develop' and 'gva_gormv2_dev' of https://github.com/flipped-aurora/gin-vue-admin into develop 2020-10-31 00:09:09 +08:00
QM303176530 28c7d178c4 模板按钮美化 2020-10-31 00:08:05 +08:00
QM303176530 5bfc5563b3 工作流增删改查功能完善 2020-10-31 00:04:42 +08:00
QM303176530 d6bc0572c2 工作流增删改查功能完善 2020-10-31 00:03:49 +08:00
QM303176530 32abd69c16 Merge branches 'gva_gormv2_dev', 'gva_workflow' and 'master' of https://github.com/flipped-aurora/gin-vue-admin into gva_workflow
 Conflicts:
	server/cmd/datas/init.go
2020-10-29 22:30:04 +08:00
QM303176530 024f461e94 date 错别字修复 2020-10-29 22:12:42 +08:00
QM303176530 a25823f5b5 修复minxs路径,调整前端结构 2020-10-29 22:08:21 +08:00
QM303176530 4d4d8e4955 修复mixins路径,调整目录结构 2020-10-29 22:08:08 +08:00
SliverHorn 7488db81c1 add err := and delete postgresql initdb 2020-10-29 22:13:24 +08:00
QM303176530 e8c6d388f2 自动化代码可以自动创建form,前端样式修复,前端mixin位置转移 2020-10-29 22:06:09 +08:00
pixel 02f155f497 整体结构变更 新增方法数据错乱问题修复 2020-10-29 17:57:29 +08:00
pixel c570c095b9 Merge branch 'gva_gormv2_dev' of https://github.com/flipped-aurora/gin-vue-admin into gva_workflow
 Conflicts:
	server/cmd/datas/apis.go
	server/cmd/datas/menus.go
	server/model/sys_workflow.go
	server/model/sys_workflow_process.go
2020-10-29 11:41:38 +08:00
pixel 10d8d7f28a 修改gorm.Model为自定义的全局global.GVA_MODEL 方便自定义基础参数 2020-10-29 11:23:34 +08:00
pixel 0e1a820c3a 工作流入库功能 2020-10-29 09:37:02 +08:00
pixel bf21fec50e 工作流录入 根据id查询方法增加 2020-10-27 18:59:51 +08:00
pixel 4e514dc83e 自动化接口填充以及初始化数据制作 2020-10-27 17:38:13 +08:00
pixel 3f52783b30 Merge branch 'gva_workflow' of https://github.com/flipped-aurora/gin-vue-admin into gva_workflow 2020-10-27 16:39:56 +08:00
pixel 16bab848e1 增加description 2020-10-27 16:39:48 +08:00
奇淼(piexlmax 986406a880 Merge pull request #261 from Enginebeck/develop
jwt.go: fix localStorage spell error
2020-10-27 14:53:23 +08:00
奇淼(piexlmax 2946c8ce34 Merge pull request #262 from Zh1Cheung/master
[fix] Unhandled error
2020-10-27 14:51:58 +08:00
奇淼(piexlmax fef12cb747 Merge pull request #257 from Junvary/own_dev
多了一个转义,后端跨域不生效
2020-10-26 21:22:40 +08:00
QM303176530 b710f6a5df 增加快捷键复制粘贴 2020-10-26 20:57:48 +08:00
QM303176530 840723c592 Merge branch 'gva_workflow' of https://github.com/flipped-aurora/gin-vue-admin into gva_workflow 2020-10-26 20:45:28 +08:00
QM303176530 6f63290e74 取消无用节点 2020-10-26 20:44:55 +08:00
张子恒 4d8d4b77c1 Update jwt.go 2020-10-26 20:15:30 +08:00
pixel 10b009bb7e 增加ctrl+z ctrl+y 2020-10-26 18:52:41 +08:00
SliverHorn 7cb172d60a rename data->date 2020-10-26 18:33:45 +08:00
pixel 8350dfe2c9 增加delete删除node功能 2020-10-26 18:21:01 +08:00
SliverHorn 970b2d21a9 add server/api/v1/exa_breakpoint_continue.go error response message 2020-10-26 17:30:23 +08:00
pixel e9c5ac6ec0 修改 workflow数据结构 2020-10-26 16:51:24 +08:00
SliverHorn f7804b627e add gva error message 2020-10-26 15:55:55 +08:00
pixel 247487529b 设计workflow数据结构 2020-10-26 13:37:55 +08:00
pixel 5ef5af4723 侧边更新 2020-10-26 13:31:11 +08:00
pixel 2188f79e77 Merge branch 'master' of https://github.com/flipped-aurora/gin-vue-admin into gva_workflow 2020-10-26 12:44:43 +08:00
pixel a7bb4a7ac4 Merge remote-tracking branch 'origin/gva_gormv2_dev' into gva_gormv2_dev 2020-10-26 12:39:27 +08:00
pixel 06c67c1024 修改 注册接口地址 2020-10-26 12:37:20 +08:00
SliverHorn 03024f192a Merge branch 'gva_gormv2_dev' of https://github.com/flipped-aurora/gin-vue-admin into gva_gormv2_dev 2020-10-26 11:33:28 +08:00
SliverHorn b1baccf0a5 update docker-compose related and update server/Dockerfile 2020-10-26 11:33:17 +08:00
pixel ad047f4c06 gorm 版本升级为 1.20.5 2020-10-26 11:22:40 +08:00
pixel dc1cc2ec10 前端添加默认数据 2020-10-26 11:19:04 +08:00
Beck Qin 6f589d7af9 jwt.go: fix localStorage spell error 2020-10-26 09:27:52 +08:00
SliverHorn eeaaa40259 add Makefile help information 2020-10-25 11:37:15 +08:00
QM303176530 e394a3afdf 忽略某些js文件的eslint 2020-10-25 11:27:38 +08:00
QM303176530 45cc0aec93 版本号更新 2020-10-25 10:42:34 +08:00
QM303176530 0bd80ad900 Merge branches 'gva_gormv2_dev' and 'master' of https://github.com/flipped-aurora/gin-vue-admin into gva_gormv2_dev 2020-10-25 10:36:53 +08:00
QM303176530 1214241dab 版本号更新发版 2020-10-25 10:36:23 +08:00
QM303176530 28dbad6c1f Merge branches 'gva_gormv2_dev' and 'gva_workflow' of https://github.com/flipped-aurora/gin-vue-admin into gva_workflow 2020-10-24 17:05:13 +08:00
QM303176530 84e35753cf 工作流插件参与进入项目本体 2020-10-24 17:04:04 +08:00
QM303176530 6a03008ac9 修改bat文件名 表达正确含义 2020-10-24 16:20:20 +08:00
奇淼(piexlmax cc215d6ad0 Update README.md 2020-10-23 21:14:19 +08:00
Junvary e28217e5ec Update cors.go
多了一个转义,后端跨域不生效
2020-10-23 16:08:50 +08:00
pixel cebb9b3002 修改默认数据 2020-10-23 14:29:09 +08:00
SliverHorn 0d8edbbb64 update initdb 2020-10-23 14:05:36 +08:00
pixel 4abcbeb420 Merge branch 'gva_gormv2_dev' of https://github.com/flipped-aurora/gin-vue-admin into gva_workflow 2020-10-23 14:02:47 +08:00
pixel 77aea09d5f 修改目录结构 2020-10-23 13:58:48 +08:00
SliverHorn 2baf392129 system add middleware, update markfile, add data 2020-10-23 13:57:41 +08:00
pixel c56e0416f2 Merge branch 'gva_gormv2_dev' of https://github.com/flipped-aurora/gin-vue-admin into gva_workflow
 Conflicts:
	server/gva/init_data/init_data.go
2020-10-23 13:27:06 +08:00
pixel d478246edc Merge branch 'master' of https://github.com/piexlmax/QMPlus into gva_gormv2_dev 2020-10-23 13:20:41 +08:00
SliverHorn ea375a026d add windows bat and change mysql password 2020-10-23 13:18:43 +08:00
奇淼(piexlmax 9101d5bdb8 Update README.md 2020-10-23 13:13:59 +08:00
SliverHorn 811df12524 Fix the error that windows cannot create soft connection 2020-10-23 11:04:29 +08:00
SliverHorn 3ee469aef3 add Makefile 2020-10-22 18:18:40 +08:00
SliverHorn 7b503337b1 add .gitignore ignore gva files, and optimization zap.go:Repair split file is windows error 2020-10-22 16:50:20 +08:00
SliverHorn dd65a4a716 Migrate the gva project to the cmd folder, delete other redundant database configurations, optimize the initialization method of viper, zap, and gorm 2020-10-22 16:28:51 +08:00
QM303176530 45f2bd4a15 删除注册页面 为注册接口修改为需要权限 防止业务漏洞 2020-10-18 12:49:18 +08:00
QM303176530 1848ceb8f7 删除注册页面 为注册接口修改为需要权限 防止业务漏洞 2020-10-18 12:26:34 +08:00
pixel 938c598cfb Merge branch 'master' of https://github.com/piexlmax/QMPlus into gva_gormv2_dev 2020-10-15 15:23:39 +08:00
pixel bea9ede941 为富文本编辑器增加标题 2020-10-15 15:20:53 +08:00
SliverHorn 6c4b217b1b repair config env error 2020-10-15 11:55:55 +08:00
奇淼(piexlmax f1de3e6b84 Update README-en.md 2020-10-13 17:37:59 +08:00
奇淼(piexlmax 6cc9a420bf Update README.md 2020-10-13 17:37:16 +08:00
SliverHorn 5b1eb546fd add ss.Dbname 2020-10-13 15:29:08 +08:00
SliverHorn 3c9d81756b 修改body字段类型为longtext 2020-10-12 13:23:45 +08:00
pixel 51b6c1086e 局部更新和自动打开文档 2020-10-12 12:06:00 +08:00
QM303176530 63012b31ac 暂时屏蔽前端自动打开页面功能 2020-10-11 16:18:56 +08:00
QM303176530 9865d53ea7 Merge branches 'gva_workflow' and 'master' of https://github.com/flipped-aurora/gin-vue-admin into gva_workflow
 Conflicts:
	web/package.json
2020-10-11 12:24:11 +08:00
QM303176530 f5c6f95b27 修复warning 前端启动自动打开文档 2020-10-11 11:42:58 +08:00
QM303176530 b7fd730c5e Merge branch 'develop' of https://github.com/flipped-aurora/gin-vue-admin into gva_gormv2_dev 2020-10-11 11:04:56 +08:00
QM303176530 3df918ef00 Merge branches 'gva_gormv2_dev' and 'master' of https://github.com/flipped-aurora/gin-vue-admin into gva_gormv2_dev 2020-10-11 11:04:37 +08:00
QM303176530 a200c2ebe0 更新版本号 2020-10-11 10:58:18 +08:00
QM303176530 a471bae727 修复多点登录拦截失效问题 2020-10-11 10:56:01 +08:00
QM303176530 9f73219c85 Merge remote-tracking branch 'origin/gva_gormv2_dev' into gva_gormv2_dev 2020-10-11 10:53:27 +08:00
QM303176530 5a474585b5 修复添加子菜单不输入内容无法添加参数的问题 2020-10-11 10:53:01 +08:00
QM303176530 213d1a700f 更新gva-wfd的前端版本 2020-10-10 20:29:58 +08:00
pixel c48048bd32 增加屏蔽loading功能 2020-10-10 13:33:48 +08:00
pixel 8fd8296c69 增加屏蔽loading功能 2020-10-10 13:33:33 +08:00
pixel e18f0cae1a 修改工作流基础功能 2020-10-09 17:42:11 +08:00
pixel 973da4df7e Merge branch 'gva_gormv2_dev' of https://github.com/piexlmax/QMPlus into gva_workflow 2020-10-09 16:16:36 +08:00
pixel 130910308d 增加系统信息轮询 2020-10-09 16:15:45 +08:00
pixel b9f7783878 增加工作流前端页面 2020-10-09 16:11:46 +08:00
奇淼(piexlmax 56cc369a77 Merge pull request #243 from ccfish86/develop_image_upload
图片上传压缩(前端)及示例
2020-10-09 13:36:38 +08:00
ccfish 8aee3b27af 图片上传压缩(前端)及示例 2020-10-09 13:22:28 +08:00
pixel 63edd741ba Merge remote-tracking branch 'origin/gva_gormv2_dev' into gva_gormv2_dev 2020-10-09 10:48:27 +08:00
SliverHorn d7007eec59 修复用户不存在的时jwt可使用的问题 2020-10-07 11:14:27 +08:00
SliverHorn 277a732df0 优化oss的初始化方式 2020-10-07 11:02:37 +08:00
SliverHorn a4b15b4731 增加备注与调整一些细节 2020-10-06 15:00:13 +08:00
SliverHorn 07c6bbd7e1 优化docker-compose的配置文件 2020-10-06 12:00:13 +08:00
SliverHorn ad504a17e0 update server-handle.sh 2020-10-06 11:34:07 +08:00
SliverHorn d16ca6967f 优化配置文件的结构体,优化文件上传与下载功能,系统配置的前端展示更友好及其他的优化 2020-10-06 11:30:50 +08:00
SliverHorn 785fde0eaf delete sql and update docker-compose.yaml 2020-10-06 10:24:13 +08:00
Granty1 af761f7472 upgrade action's go version 2020-10-05 22:57:26 +08:00
Granty1 5235511041 front end: server state info 2020-10-05 22:47:40 +08:00
SliverHorn 272f6c7b39 添加os的Compiler的获取 2020-10-05 13:34:39 +08:00
SliverHorn 22bc9f43bd 完成获取服务器信息的功能接口 2020-10-05 13:09:55 +08:00
奇淼(piexlmax c2747590e0 Update README-en.md 2020-09-29 14:07:11 +08:00
奇淼(piexlmax 794f8a631c Update README.md 2020-09-29 14:03:54 +08:00
pixel 04c0071b83 Merge branch 'master' of https://github.com/piexlmax/QMPlus into gva_gormv2_dev
 Conflicts:
	server/gva/init_data/init_data.go
2020-09-28 15:03:23 +08:00
pixel e5de639757 增加版本号功能 2020-09-28 11:32:16 +08:00
SliverHorn 553980cf73 添加issues模板 2020-09-26 17:29:12 +08:00
SliverHorn ff7390f1e6 修复文件上传记录body太大导致的数据库报错 2020-09-25 16:37:15 +08:00
SliverHorn 4927f414f7 优化上传与下载文件示例的上传与删除的api层与service层代码 2020-09-25 13:23:31 +08:00
SliverHorn 329d3fc622 新增服务器参数工具文件,修改8000->8888,删除多余的依赖文件 2020-09-24 16:35:38 +08:00
奇淼(piexlmax 1b6d80dfe9 Merge pull request #228 from maplepie/master
默认使用兼容模式
2020-09-23 21:18:32 +08:00
奇淼(piexlmax dd45558e6a Update README-en.md 2020-09-23 21:07:30 +08:00
奇淼(piexlmax dc273edf3c Update README.md 2020-09-23 21:05:40 +08:00
SliverHorn 621069eee7 优化 优先级: 命令行 > 环境变量 > 默认值 功能 2020-09-23 19:04:24 +08:00
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
SliverHorn f6a3c65129 修改ErrorToEmail中间件的请求方式错误 2020-09-23 11:25:38 +08:00
SliverHorn d930a9e95a 对gorm生成的外键表多s问题作出兼容代码 2020-09-23 11:14:08 +08:00
SliverHorn 3dea48b54e 完善ErrorToEmail中间件 2020-09-23 11:07:50 +08:00
maplepie f1c00c6b20 默认使用兼容模式
默认使用兼容模式,避免扯皮。
2020-09-23 09:42:29 +08:00
SliverHorn 099ff42404 修复config的错误,调整记录日志中间件的获取用户id逻辑,优先从jwt里取,新增状态码不为200时发送邮件到指定邮箱功能 2020-09-22 18:45:24 +08:00
SliverHorn f8e1832172 新增postgresql的Host配置 2020-09-22 17:53:20 +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
QM303176530 f130aec168 断点续传添加事务回滚 2020-08-22 12:28:35 +08:00
pixel 10ea953bfd 修复中间件跨域问题 2020-08-20 12:01:52 +08:00
pixel 9f1504e88a 修复swag参数错误 2020-08-20 12:00:17 +08:00
pixel 0239f7b97c 增加令牌自动续期功能 2020-08-17 14:04:02 +08:00
QM303176530 9679616935 清理warning相关信息 2020-08-16 20:27:56 +08:00
QM303176530 2022a417ab 修复了tab右键相关操作的bug 2020-08-16 20:21:38 +08:00
QM303176530 980436807c 修复菜单参数导致tab栏点击切换出现错误的问题 2020-08-16 19:53:47 +08:00
QM303176530 fd74cc719d Merge remote-tracking branch 'origin/gin-vue-admin_v2_dev' into gin-vue-admin_v2_dev 2020-08-15 23:15:29 +08:00
QM303176530 d1502d2b7d 增加了断点续传插件版 保留原始版本供学习原理使用 2020-08-15 23:14:49 +08:00
SliverHorn a5558badf1 修复三首歌曲无法播放的问题 2020-08-15 17:45:20 +08:00
QM303176530 f99bfe2c84 增加菜单参数配置功能
移除视图中复杂sql更改为model映射模式
2020-08-11 23:41:47 +08:00
QM303176530 834a233d19 增加菜单参数配置功能
移除视图中复杂sql更改为model映射模式
2020-08-11 23:23:37 +08:00
SliverHorn 61fdaefe24 Merge branch 'gin-vue-admin_v2_dev' of https://github.com/flipped-aurora/gin-vue-admin into gin-vue-admin_v2_dev 2020-08-07 10:41:56 +08:00
SliverHorn cf217bde03 恢复web的前端production配置文件的v1代理,server的config.yaml以及core文件夹下的server.go文件恢复原样,新增两个命令行脚本自定义配置及文件变动,修改mysql的3306端口为13306 2020-08-07 10:41:21 +08:00
QM303176530 e6e99d0b52 修改sys_operation_records表的body字段和resp字段的属性为longtext 2020-08-06 22:03:26 +08:00
QM303176530 73d55910e5 Merge branches 'gin-vue-admin_v2_dev' and 'master' of https://github.com/flipped-aurora/gin-vue-admin into gin-vue-admin_v2_dev 2020-08-06 21:09:08 +08:00
SliverHorn f643abd549 README.md新增docker-compose的使用文档 2020-08-06 17:26:56 +08:00
rainyan fe40c28814 Update Readme 2020-08-06 16:50:00 +08:00
rainyan 5233bf2e5b Update Readme 2020-08-06 16:48:30 +08:00
rainyan 971dafbb8d update Readme 2020-08-06 16:47:39 +08:00
SliverHorn 8ae25dc264 新增docker-compose的支持,文档说明取消gopm,改用Go Modules主流的代理模式 2020-08-06 16:09:49 +08:00
rainyan a8524fa30f Update ReadMe 2020-08-05 22:29:28 +08:00
rainyan b9b3a30f75 Update ReadMe 2020-08-05 22:27:27 +08:00
rainyan d97b49c950 Update ReadMe 2020-08-05 22:26:32 +08:00
rainyan d303955747 Update ReadMe 2020-08-05 22:25:41 +08:00
蒋吉兆 211ba42fed Update README-zh_CN.md 2020-08-03 17:11:57 +08:00
蒋吉兆 f61f4d6b77 Update README.md 2020-08-03 17:08:58 +08:00
蒋吉兆 152ec2423c Update README.md 2020-08-03 16:56:35 +08:00
蒋吉兆 fee4af62c4 Merge pull request #170 from WangLeonard/pack-static-files
打包静态文件到二进制
2020-07-29 10:51:13 +08:00
Leonard Wang 2483581158 打包静态文件到二进制 2020-07-28 22:27:49 +08:00
pixel 9cb7ae871d Merge branch 'gin-vue-admin_v2_dev' of https://github.com/piexlmax/QMPlus into gin-vue-admin_v2_dev 2020-07-28 15:24:16 +08:00
pixel 06cbc9c3a3 消灭了小图标状态下Maximum的问题 2020-07-28 15:24:01 +08:00
QM303176530 fb0ac5356e Merge remote-tracking branch 'origin/gin-vue-admin_v2_dev' into gin-vue-admin_v2_dev 2020-07-26 20:35:18 +08:00
QM303176530 8dfdb21c36 添加指令:v-auth,根据当前角色来选择是否展示页面某些元素 2020-07-26 20:27:39 +08:00
klausY 60341e2881 版权标识细节调整 2020-07-21 11:18:02 +08:00
pixel d53fe1f32c Merge branches 'gin-vue-admin_v2_dev' and 'master' of https://github.com/piexlmax/QMPlus into gin-vue-admin_v2_dev 2020-07-20 18:05:28 +08:00
QM303176530 41c4b8f0a5 代码生成器支持直接使用字典
修复查询涉及sql关键字时sql语句报错问题
2020-07-18 14:39:03 +08:00
蒋吉兆 fbca3eaa7b Merge pull request #155 from SliverHorn/patch-1
Update sys_dictionary.go
2020-07-18 14:38:27 +08:00
QM303176530 de1d090c31 代码生成器支持直接使用字典
修复查询涉及sql关键字时sql语句报错问题
2020-07-18 14:27:03 +08:00
SliverHorn 6be75b61a8 Update sys_dictionary.go
添加``,解决mysql关键字冲突
2020-07-17 23:21:50 +08:00
pixel 0f7a6a548f 增加贡献者列表 修复系统设置mysqllog问题和创建用户最低6个字符限制 2020-07-17 16:07:59 +08:00
pixel 9a12fbf48c 增加详细教程 2020-07-16 18:16:11 +08:00
pixel 2f8c532713 增加开发步骤教学 2020-07-16 18:13:34 +08:00
pixel 6ddda9f77e Merge branches 'gin-vue-admin_v2_dev' and 'master' of https://github.com/piexlmax/QMPlus into gin-vue-admin_v2_dev 2020-07-15 10:57:43 +08:00
pixel 174a300172 修复 操作日志当结构不为json时的参数展示形式 2020-07-15 10:55:22 +08:00
QM303176530 7ca11b979a 更换在线预览地址 2020-07-11 01:34:07 +08:00
pixel a586375724 Merge branches 'gin-vue-admin_v2_dev' and 'master' of https://github.com/piexlmax/QMPlus into gin-vue-admin_v2_dev 2020-07-10 18:04:18 +08:00
pixel 4d9da856f7 Merge branch 'gin-vue-admin_v2_dev' of https://github.com/piexlmax/QMPlus into gin-vue-admin_v2_dev 2020-07-10 18:03:41 +08:00
pixel cea3618e74 修改重复校验 2020-07-10 18:03:35 +08:00
蒋吉兆 aec64e4e79 Create FUNDING.yml 2020-07-10 16:23:32 +08:00
蒋吉兆 4adf2f1b04 Update README-zh_CN.md 2020-07-09 15:26:21 +08:00
蒋吉兆 eeb9f0aae6 Update README.md 2020-07-09 15:25:24 +08:00
蒋吉兆 cea8a12a37 Merge pull request #137 from xy6409068/develop
Update system.vue
2020-07-08 19:48:09 +08:00
安徽许彦祖 c2c8d4fa3b Update system.vue
修复端口号修改失败问题
2020-07-08 18:28:00 +08:00
安徽许彦祖 55cea812b5 Update system.vue
修复更改端口号时清零问题
2020-07-08 18:21:04 +08:00
pixel 555dd46296 Merge branches 'master' and 'operation-record' of https://github.com/piexlmax/QMPlus into operation-record 2020-07-08 16:59:24 +08:00
pixel 86ad612884 Merge branches 'develop' and 'operation-record' of https://github.com/piexlmax/QMPlus into operation-record 2020-07-08 11:24:12 +08:00
pixel df0312e60e 2020/07/08 数据库更新 数据库版本补丁 2020-07-08 11:23:21 +08:00
granty1 1a75f23615 Fixed bug: log will not appear in log file 2020-07-07 19:39:25 +08:00
pixel f8c0896775 数据库脚本替换 2020-07-07 17:40:49 +08:00
pixel 71ba8e7b55 删除测试代码 2020-07-07 16:49:59 +08:00
pixel 0e256bc912 增加状态码标签样式 2020-07-07 16:46:47 +08:00
pixel 943913b443 自动化代码增加 批量删除功能 2020-07-07 16:39:36 +08:00
pixel a7e2ef171f 更改日志功能样式 2020-07-07 15:41:40 +08:00
pixel 152946ac42 文档更新 2020-07-07 10:21:17 +08:00
pixel 35b507204c 修改查询table sql语句 兼容性 2020-07-07 10:02:20 +08:00
pixel 7a31de2960 menu鉴权模式代码书写重复 2020-07-07 09:41:54 +08:00
QM303176530 e27066d9ac 从数据库获取表结构直接生成代码 2020-07-05 22:07:22 +08:00
QM303176530 9068ca6ea7 数据库更新,从table构建代码模式更新 2020-07-05 16:48:26 +08:00
QM303176530 8f21a2158f Merge branch 'operation-record' of https://github.com/flipped-aurora/gin-vue-admin into operation-record
 Conflicts:
	server/router/sys_auto_code.go
2020-07-05 16:31:06 +08:00
QM303176530 fe7364b301 可从数据库获取字段 2020-07-05 16:29:45 +08:00
Granty1 783e355501 update method of operation record 2020-07-05 14:45:05 +08:00
QM303176530 9a582877ea 增加body列 2020-07-04 18:54:30 +08:00
granty1 537e7ced45 Add user id support for operation record. 2020-07-03 16:45:58 +08:00
蒋吉兆 ceeb00043a Update README-zh_CN.md 2020-07-02 21:54:01 +08:00
蒋吉兆 79c2d33a01 Update README.md 2020-07-02 21:53:31 +08:00
QM303176530 1c99c3a377 头部信息增加用户id 2020-07-02 15:24:02 +08:00
QM303176530 44c4b2764e 进行日志相关样式修改,删除无用接口 2020-07-02 15:06:20 +08:00
QM303176530 06976adb00 屏蔽七牛云相关配置 2020-07-02 15:05:31 +08:00
QM303176530 ec53501431 Merge branches 'master' and 'operation-record' of https://github.com/flipped-aurora/gin-vue-admin into operation-record
 Conflicts:
	server/config.yaml
2020-07-02 14:34:08 +08:00
蒋吉兆 92f82af3d2 Merge pull request #128 from JuwanXu/develop
非 Windows 操作系统使用endless启动服务
2020-07-02 14:06:33 +08:00
QM303176530 4153eb9435 屏蔽七牛云相关配置 2020-07-01 15:44:23 +08:00
蒋吉兆 ecab8cf918 Merge pull request #132 from jimmy201602/master
fix qiniu go mod bug
2020-07-01 15:45:32 +08:00
jimmy201602 46e0960c3a fix qiniu go mod bug 2020-07-01 14:56:43 +08:00
granty1 974b7c7b81 Add operation record, and the user ID is not well thought out how to parse~ 2020-06-30 13:55:43 +08:00
徐志伟 9a0c74e04c 修复Windows下编译endless失败问题 2020-06-30 12:43:21 +08:00
QM303176530 bd45ec083f 修正角色id为空的bug 2020-06-30 11:50:02 +08:00
granty1 ce013d31c2 add operation primary realization 2020-06-29 21:58:53 +08:00
Granty1 33340c2eb8 add base operation record code 2020-06-28 22:04:54 +08:00
QM303176530 7b1a87116c 增加字典提示 2020-06-28 21:36:30 +08:00
QM303176530 6adfab6d8a 增加示例注释 2020-06-28 21:29:07 +08:00
QM303176530 02df16d2f0 前端文件变化,数据库文件变更 2020-06-28 21:26:52 +08:00
QM303176530 30f1ee77e0 前端utils中封装了前端获取字典并缓存到内存的方法getDict 2020-06-28 21:23:06 +08:00
QM303176530 f6c951dd13 验证码配置参数修改进配置文件,前端角色id不再允许输入英文字符 2020-06-26 21:40:26 +08:00
QM303176530 9c40447071 修复客户管理示例文件的查询bug 2020-06-26 17:26:54 +08:00
徐志伟 990fd1f4f3 非Windows操作系统使用endless启动服务 2020-06-25 19:02:09 +08:00
徐志伟 a9961f1f19 update go.mod 2020-06-25 18:53:23 +08:00
徐志伟 413f4bca17 update go.mod 2020-06-25 18:52:07 +08:00
QM303176530 472e5039fb Merge branches 'develop', 'gin-vue-admin_v2_dev' and 'master' of https://github.com/flipped-aurora/gin-vue-admin into develop
 Conflicts:
	server/resource/template/te/model.go.tpl
2020-06-24 21:57:10 +08:00
QM303176530 fa3b53d1fd 增加字典管理 2020-06-24 21:53:54 +08:00
QM303176530 96bd856405 字典细节调整 2020-06-24 20:45:49 +08:00
QM303176530 08301fde62 增加字典管理功能 2020-06-24 20:41:36 +08:00
蒋吉兆 0e72e9f9f9 Merge pull request #127 from hansonyu183/fix-bug-and-new-feature
修复:AutoCode生成的表格不显示bool值
2020-06-23 18:38:44 +08:00
hansonyu183 666ad8c14e Merge branch 'fix-bug-and-new-feature' of github.com:hansonyu183/gin-vue-admin into fix-bug-and-new-feature 2020-06-22 22:41:47 +08:00
hansonyu183 3791e573d3 修复:AutoCode生成的表格不显示bool值
修复:多了个}
2020-06-22 22:39:38 +08:00
hansonyu183 fab3d5402f 修复:AutoCode生成的表格不显示bool值 2020-06-22 22:13:06 +08:00
蒋吉兆 f09c081b5d Update model.go.tpl
自动化代码bug修复
2020-06-21 13:00:28 +08:00
QM303176530 27e5c1786c 二维码模式更换 2020-06-20 16:38:33 +08:00
QM303176530 f54c6f2124 Merge branches 'develop' and 'master' of https://github.com/flipped-aurora/gin-vue-admin into develop 2020-06-20 15:47:32 +08:00
蒋吉兆 88aab4666d Merge pull request #125 from hansonyu183/fix-bug-and-new-feature
修复优化自动代码中对bool类型搜索字段的支持
2020-06-20 15:33:30 +08:00
hansonyu183 937239b7ba 修复优化自动代码中对bool类型搜索字段的支持 2020-06-20 13:01:08 +08:00
QM303176530 6411c5cb9c Merge branches 'gin-vue-admin_v2_dev' and 'plug' of https://github.com/flipped-aurora/gin-vue-admin into plug 2020-06-16 13:55:49 +08:00
QM303176530 052534210b 隐藏代码注入方式的插件模式 2020-06-16 13:54:54 +08:00
QM303176530 0da10baf19 修改数量查询方法 2020-06-16 13:54:07 +08:00
pixel 8853992c1a gvaplug 版本号更新 2020-06-12 17:01:47 +08:00
pixel 17d73b1262 插件功能修改 2020-06-12 16:43:47 +08:00
Granty1 561b20efe2 Add some log & remove useless func 2020-06-12 16:20:38 +08:00
QM303176530 8ec30ac3b7 插件功能更新 修改插件包的实现方案 2020-06-11 23:52:25 +08:00
QM303176530 98eb6bd796 Merge branch 'master' of https://github.com/flipped-aurora/gin-vue-admin into plug 2020-06-11 23:13:28 +08:00
QM303176530 aa2d304682 屏蔽开发中的插件功能 2020-06-11 23:13:04 +08:00
蒋吉兆 738175a9d8 Update README-zh_CN.md 2020-06-11 22:16:21 +08:00
蒋吉兆 884c8a433e Update README.md 2020-06-11 22:15:56 +08:00
蒋吉兆 5f5e105c87 Update README-zh_CN.md 2020-06-11 18:03:18 +08:00
蒋吉兆 682d92e00b Update README.md 2020-06-11 16:06:17 +08:00
pixel 2d01841b9e Merge branches 'gin-vue-admin_v2_dev', 'master' and 'plug' of https://github.com/piexlmax/QMPlus into plug 2020-06-11 11:50:03 +08:00
Granty1 7e574cb525 Format project code & upgrade some dependence 2020-06-11 11:40:21 +08:00
pixel eca0a38678 增加表格注释 2020-06-11 09:39:44 +08:00
蒋吉兆 fe3256175d Merge pull request #117 from DaiZero/master
fix fullscreen bug
2020-06-09 04:43:44 -05:00
DZero e5fd2fa1a7 fix fullscreen bug
修复点击全屏后,按Esc键退出全屏,全屏按钮图标没有改变的问题
2020-06-09 14:38:01 +08:00
pixel c7ea8ccb7d 角色管理新增角色bug修复 2020-06-08 12:52:48 +08:00
pixel 3b18442e76 自动生成代码按钮列加宽 2020-06-07 15:31:09 +08:00
pixel 7ad73a09b3 按钮美化 2020-06-07 15:08:51 +08:00
pixel 2da199145d Merge branches 'develop' and 'plug' of https://github.com/piexlmax/QMPlus into plug 2020-06-07 15:07:10 +08:00
蒋吉兆 671e450a99 Merge pull request #111 from 957651480/master
数据表操作美化按钮
2020-06-07 02:06:45 -05:00
pixel fde276e159 增加自动创建搜索功能 增加搜索条件 增加数据库注释 增加插件功能(0.0.1版 请勿用于生产) 2020-06-07 14:56:37 +08:00
yangtaihua bb64ea839b 数据表操作按钮美化 2020-06-07 07:46:43 +08:00
pixel 8173ff6fc2 插件功能开发完整度 +1 2020-06-07 00:04:56 +08:00
QM303176530 c4a6b33f62 修复角色新增时携带信息问题 2020-06-01 21:02:32 +08:00
pixel db26f5b8f5 冗余代码修复 2020-06-01 17:43:02 +08:00
pixel 5d411c021e Merge branches 'gin-vue-admin_v2_dev' and 'master' of https://github.com/piexlmax/QMPlus into gin-vue-admin_v2_dev 2020-06-01 12:05:48 +08:00
pixel 1597eeacfc icon warning修复 2020-06-01 11:53:56 +08:00
pixel d94d7c4c29 上移 下载美化 2020-06-01 11:48:33 +08:00
pixel 3cd2ea25e5 Merge branches 'develop' and 'gin-vue-admin_v2_dev' of https://github.com/piexlmax/QMPlus into gin-vue-admin_v2_dev
 Conflicts:
	server/resource/template/te/model.go.tpl
2020-06-01 11:22:00 +08:00
pixel fb2794adde Merge remote-tracking branch 'origin/gin-vue-admin_v2_dev' into gin-vue-admin_v2_dev
# Conflicts:
#	server/resource/template/te/model.go.tpl
2020-06-01 11:18:45 +08:00
pixel 318f688259 Merge branch 'gin-vue-admin_v2_dev' of G:\QMPlus with conflicts. 2020-06-01 11:18:13 +08:00
蒋吉兆 e51e8aef73 Merge pull request #102 from WangLeonard/refactor-CreateTemp
重构CreateTemp
2020-05-31 22:13:03 -05:00
蒋吉兆 f237557b99 Update README.md 2020-05-30 15:32:21 +08:00
蒋吉兆 291c30cfed Update README-zh_CN.md 2020-05-30 15:18:24 +08:00
Leonard Wang a7141feff7 重构CreateTemp 2020-05-28 00:48:27 +08:00
蒋吉兆 9bfb5eba97 Merge pull request #100 from DaiZero/master
field列表添加上移和下移的功能
2020-05-25 22:43:56 -05:00
DZero 75432c45ba field列表添加上移和下移的功能 2020-05-26 08:37:40 +08:00
395 changed files with 31800 additions and 19942 deletions
+26
View File
@@ -0,0 +1,26 @@
server {
listen 8080;
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;
}
}
+85
View File
@@ -0,0 +1,85 @@
#! /bin/bash
rm -f ./config.yaml
# 生成config.yaml文件, 用于docker-compose的使用
touch ./config.yaml
filename="./config.yaml"
cat>"${filename}"<<EOF
# Gin-Vue-Admin Global Configuration
# jwt configuration
jwt:
signing-key: 'qmPlus'
# zap logger configuration
zap:
level: 'info'
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
# redis configuration
redis:
db: 0
addr: '177.7.0.14:6379'
password: ''
# email configuration
email:
to: 'xxx@qq.com'
port: 465
from: 'xxx@163.com'
host: 'smtp.163.com'
is-ssl: true
secret: 'xxx'
nickname: 'test'
# casbin configuration
casbin:
model-path: './resource/rbac_model.conf'
# system configuration
system:
env: 'public' # Change to "develop" to skip authentication for development mode
addr: 8888
db-type: 'mysql'
oss-type: 'local'
use-multipoint: false
# captcha configuration
captcha:
key-long: 6
img-width: 240
img-height: 80
# mysql connect configuration
mysql:
path: '177.7.0.13:3306'
config: 'charset=utf8mb4&parseTime=True&loc=Local'
db-name: 'qmPlus'
username: 'root'
password: 'Aa@6447985'
max-idle-conns: 10
max-open-conns: 10
log-mode: false
# local configuration
local:
path: 'uploads/file'
# qiniu configuration (请自行七牛申请对应的 公钥 私钥 bucket 和 域名地址)
qiniu:
zone: 'ZoneHuadong'
bucket: 'qm-plus-img'
img-path: 'http://qmplusimg.henrongyi.top'
use-https: false
access-key: '25j8dYBZ2wuiy0yhwShytjZDTX662b8xiFguwxzZ'
secret-key: 'pgdbqEsf7ooZh7W3xokP833h3dZ_VecFXPDeG5JY'
use-cdn-domains: false
EOF
+12
View File
@@ -0,0 +1,12 @@
# These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: https://www.gin-vue-admin.com/docs/coffee
+70
View File
@@ -0,0 +1,70 @@
---
name: issues模板
about: 请严格按照要求进行提交issues! 如果未能按照要求,我们将会close您的issues,敬请谅解!
---
<!-- 在提交问题之前,请先回答这些问题。谢谢! -->
### 1. 您使用的是哪个版本的`Go`和系统类型/架构 ?
<!--
请从您的终端粘贴命令 `go version` 的输出。
期望看到像: `go version go1.14.4 darwin/amd64`
-->
### 2. 您使用的是哪个版本的 `Nodejs` 和 `npm` 或 `cnpm` ?
<!--
请从您的终端粘贴命令 `node -v` 的输出。
期望看到像: `v12.16.1`
-->
<!--
请从您的终端粘贴命令 `npm -v` 的输出。
期望看到像: `6.13.4`
-->
<!--
请从您的终端粘贴命令 `cnpm -v` 的输出。
期望看到的像: `
cnpm@6.1.1 (/usr/local/lib/node_modules/cnpm/lib/parse_argv.js)
npm@6.14.2 (/usr/local/lib/node_modules/cnpm/node_modules/npm/lib/npm.js)
node@12.16.1 (/usr/local/bin/node)
npminstall@3.27.0 (/usr/local/lib/node_modules/cnpm/node_modules/npminstall/lib/index.js)
prefix=/usr/local
darwin x64 19.6.0
registry=https://r.npm.taobao.org
`
-->
### 3. 您使用的是哪个版本的 `gin-vue-admin` ?
<!--
您如果克隆的是master就写master,
如果是在Releases中下载的zip/tar.gz对应的tag版本,
如:`v2.3.0`
-->
### 4. 可以在master版本中复现此问题吗 ?
### 5. 您做了什么 ?
<!--
如果可能,请提供最短代码的副本以重现该错误。
一个完整的可运行程序是最好的。
-->
### 6. 您期望看到什么 ?
### 7. 您看到了什么 ?
### 8. 错误堆栈或者SQL打印
+44 -46
View File
@@ -1,66 +1,64 @@
name: gin-vue-admin build test
on:
push:
branches:
- '*'
paths-ignore:
- './db/**'
- '**.md'
pull_request:
branches:
- '*'
paths-ignore:
- './db/**'
- '**.md'
push:
branches:
- "*"
paths-ignore:
- "./db/**"
- "**.md"
pull_request:
branches:
- "*"
paths-ignore:
- "./db/**"
- "**.md"
jobs:
frontend:
name: Frontend build
name: Frontend build
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- name: Check out branch
uses: actions/checkout@v2
- name: Check out branch
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Build test
run: |
npm install
npm run build
working-directory: ./web
- name: Build test
run: |
npm install
npm run build
working-directory: ./web
backend:
name: Backend build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.14
uses: actions/setup-go@v1
with:
go-version: 1.14
id: go
- name: Set up Go 1.13
uses: actions/setup-go@v1
with:
go-version: 1.13
id: go
- name: Check out branch
uses: actions/checkout@v2
- name: Check out branch
uses: actions/checkout@v2
- name: Download dependencies
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
working-directory: ./server
- name: Download dependencies
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
working-directory: ./server
- name: Test and Build
run: |
go build -v -race
working-directory: ./server
- name: Test and Build
run: |
go build -v -race
working-directory: ./server
+1
View File
@@ -24,6 +24,7 @@ yarn-error.log*
go.sum
/server/log/
/server/gva
/server/latest_log
*.iml
+376
View File
@@ -0,0 +1,376 @@
<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.14
- 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.
-260
View File
@@ -1,260 +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/)
- 前端UI框架:[element-ui](https://github.com/ElemeFE/element)
- 后台框架:[gin](https://github.com/gin-gonic/gin)
## 1. 基本介绍
### 1.1 项目介绍
[在线预览](http://qmplus.henrongyi.top/)
> 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. 使用说明
```
- 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 包下面的东西,需要先安装`gopm`
```bash
# 下载gopm包
go get -v -u github.com/gpmgo/gopm
# 执行
gopm 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 系统架构图
![系统架构图](./docs/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群 |
| :---: |
| <img src="http://qmplusimg.henrongyi.top/qq.jpg" width="180"/> |
### QQ交流群:622360840
### 微信交流群:可以添加上面任意一位开发者,备注"加入gin-vue-admin交流群"
### 8.2 项目组成员
| 蒋 | 尹 | 严 | 杜 | 印 | 宋 |
| :---: | :---: | :---: | :---: | :---: | :---: |
| <img width="150" src="http://qmplusimg.henrongyi.top/qrjjz.png"> | <img width="150" src="http://qmplusimg.henrongyi.top/qryx.png"> | <img width="150" src="http://qmplusimg.henrongyi.top/qryr.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) | 项目发起者 | 蒋 |
| [@granty1](https://github.com/granty1) | 后台开发 | 印 |
| [@Ruio9244](https://github.com/Ruio9244) | 全栈开发 | 严 |
| [@1319612909](https://github.com/1319612909) | 前端UI开发 | 杜 |
| [@krank666](https://github.com/krank666) | 前端开发 | 尹 |
| [@chen-chen-up](https://github.com/chen-chen-up) | 新手开发 | 宋 |
## 9. 捐赠
如果你觉得这个项目对你有帮助,你可以请作者喝饮料 :tropical_drink:
+257 -152
View File
@@ -1,4 +1,4 @@
<div align=center>
<img src="http://qmplusimg.henrongyi.top/gvalogo.jpg" width=300" height="300" />
</div>
@@ -10,70 +10,139 @@
<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/)
[gitee地址](https://gitee.com/pixelmax/gin-vue-admin)|
[github地址](https://github.com/flipped-aurora/gin-vue-admin)
- 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/) : https://www.gin-vue-admin.com/
## 1. Basic Introduction
[从环境到部署教学视频](https://www.bilibili.com/video/BV1fV411y7dT)
### 1.1 Project Introduction
[开发教学](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)
[Online Demo](http://qmplus.henrongyi.top/)
> 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.
## 1. 基本介绍
Hi! Thank you for choosing gin-vue-admin.
### 1.1 项目介绍
Gin-vue-admin is a full-stack (frontend and backend separation) framework for developers, designers and product managers.
[在线预览](http://demo.gin-vue-admin.com/)
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.
测试用户名:admin
### 1.2 Contributing Guide
#### 1.2.1 Issue Guidelines
测试密码:123456
- 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.
> Gin-vue-admin是一个基于vue和gin开发的全栈前后端分离的后台管理系统,集成jwt鉴权,动态路由,动态菜单,casbin鉴权,表单生成器,代码生成器等功能,提供多种示例文件,让您把更多时间专注在业务开发上。
- Before submitting an issue, please check if similar problems have already been issued.
### 1.2 贡献指南
Hi! 首先感谢你使用 gin-vue-admin。
#### 1.2.2 Pull Request Guidelines
Gin-vue-admin 是一套为后台管理平台准备的一整套前后端分离架构式的开源框架,旨在快速搭建后台管理系统。
- Fork this repository to your own account. Do not create branches here.
Gin-vue-admin 的成长离不开大家的支持,如果你愿意为 gin-vue-admin 贡献代码或提供建议,请阅读以下内容。
- Commit info should be formatted as `[File Name]: Info about commit.` (e.g. `README.md: Fix xxx bug`)
#### 1.2.1 Issue 规范
- issue 仅用于提交 Bug 或 Feature 以及设计相关的内容,其它内容可能会被直接关闭。如果你在使用时产生了疑问,请到 Slack 或 [Gitter](https://gitter.im/ElemeFE/element) 里咨询。
- <font color=red>Make sure PRs are created to `develop` branch instead of `master` branch.</font>
- 在提交 issue 之前,请搜索相关内容是否已被提出。
- If your PR fixes a bug, please provide a description about the related bug.
#### 1.2.2 Pull Request 规范
- 请先 fork 一份到自己的项目下,不要直接在仓库下建分支。
- Merging a PR takes two maintainers: one approves the changes after reviewing, and then the other reviews and merges.
- commit 信息要以`[文件名]: 描述信息` 的形式填写,例如 `README.md: fix xxx bug`。
### 1.3 Version list
- <font color=red>确保 PR 是提交到 `develop` 分支,而不是 `master` 分支。</font>
- master: 2.0 dev code, for prod
- 如果是修复 bug,请在 PR 中给出描述信息。
- develop: 2.0 dev code, for test
- 合并代码需要两名维护人员参与:一人进行 review 后 approve,另一人再次 review,通过后即可合并。
- [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)
### 1.3 版本列表
- [gin-vue-admin_v1.0_stable](https://github.com/flipped-aurora/gin-vue-admin/tree/gin-vue-admin_v1_stable) (v1.0 is kept up to date and maintained)
- 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)开发分支)
- [gin-vue-admin_v1.0_dev](https://github.com/flipped-aurora/gin-vue-admin/tree/gin-vue-admin_v1_dev) (v1.0 is kept up to date and maintained)
## 2. 使用说明
## 2. Getting started
```
- 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.
- node版本 > v8.6.0
- golang版本 >= v1.14
- IDE推荐:Goland
- gormv2版本初始化数据库可以利用批量创建功能,这里已经写好初始化代码,需要在main.go内打开 initialize.Data() 的注释即可
- 替换掉项目中的七牛云公钥,私钥,仓名和默认url地址,以免发生测试文件数据错乱
```
### 2.1 Web
> 使用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:8000](http://127.0.0.1:8000)
- swagger文档 [http://127.0.0.1:8888/swagger/index.html](http://127.0.0.1:8888/swagger/index.html)
- 如果server的177.7.0.12这个容器内部ip被占用了,需要修改地方为
- [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
@@ -89,177 +158,213 @@ 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 `gopm`
````bash
# install gopm
go get -v -u github.com/gpmgo/gopm
##### (2)无法翻墙
# get swag
gopm get -g -v github.com/swaggo/swag/cmd/swag
由于国内没法安装 go.org/x 包下面的东西,推荐使用 [goproxy.io](https://goproxy.io/zh/)
# cd GOPATH/src/github.com/swaggo/swag/cmd/swag
go install
````
```bash
如果您使用的 Go 版本是 1.13 及以上(推荐)
# 启用 Go Modules 功能
go env -w GO111MODULE=on
# 配置 GOPROXY 环境变量
go env -w GOPROXY=https://goproxy.io,direct
#### 2.3.2 API docs generation
# 使用如下命令下载swag
go get -u github.com/swaggo/swag/cmd/swag
```
#### 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](./docs/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 |
## 8. 联系方式
### 8.1 技术群
### QQ交流群:622360840
| QQ 群 |
| :---: |
| <img src="http://qmplusimg.henrongyi.top/qq.jpg" width="180"/> |
### QQ group: 622360840
### Wechat group: add anyone above, comment "加入gin-vue-admin交流群"
### 微信交流群
| 微信 |
| :---: |
| <img width="150" src="http://qmplusimg.henrongyi.top/qrjjz.png">
### 8.2 Team members
| Jiang | Yin | Yan | Du | Yin | Song |
| :---: | :---: | :---: | :---: | :---: | :---: |
| <img width="150" src="http://qmplusimg.henrongyi.top/qrjjz.png"> | <img width="150" src="http://qmplusimg.henrongyi.top/qryx.png"> | <img width="150" src="http://qmplusimg.henrongyi.top/qryr.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"> |
添加微信,备注"加入gin-vue-admin交流群"
| Nick name | Project position | First name |
| ---- | ---- | ---- |
| [@piexlmax](https://github.com/piexlmax) | Project sponsor | Jiang |
| [@granty1](https://github.com/granty1) | Backend developer | Yin |
| [@Ruio9244](https://github.com/Ruio9244) | Full-stack developer | Yan |
| [@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 |
### [关于我们](https://www.gin-vue-admin.com/about/)
## 9. Donate
## 9. 捐赠
If you find this project useful, you can buy author a glass of juice :tropical_drink:
如果你觉得这个项目对你有帮助,你可以请作者喝饮料 :tropical_drink: [点我](https://www.gin-vue-admin.com/docs/coffee)
## 10. 商用注意事项
如果您将此项目用于商业用途,请遵守Apache2.0协议并保留作者技术支持声明。
+66
View File
@@ -0,0 +1,66 @@
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:
- '8080:8080'
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
restart: always
ports:
- '8888:8888'
depends_on:
- mysql
- redis
links:
- mysql
- redis
networks:
network:
ipv4_address: 177.7.0.12
mysql:
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物理直接映射端口为13306
environment:
MYSQL_DATABASE: 'qmPlus' # 初始化启动时要创建的数据库的名称
MYSQL_ROOT_PASSWORD: 'Aa@6447985' # root管理员用户密码
networks:
network:
ipv4_address: 177.7.0.13
redis:
image: redis:6.0.6
container_name: gva-redis # 容器名
restart: always
ports:
- '16379:6379'
networks:
network:
ipv4_address: 177.7.0.14
Executable → Regular
View File
+31
View File
@@ -0,0 +1,31 @@
FROM golang:alpine
ENV GO111MODULE=on
ENV GOPROXY=https://goproxy.io,direct
WORKDIR /go/src/gin-vue-admin
COPY server/ ./
RUN cat ./config.yaml
COPY .docker-compose/shell/server-handle.sh .
RUN ls -al
RUN sh ./server-handle.sh
RUN rm -f server-handle.sh
RUN cat ./config.yaml
RUN go build -o gva cmd/main.go
RUN go env && go build -o server .
FROM alpine:latest
LABEL MAINTAINER="SliverHorn@sliver_horn@qq.com"
WORKDIR /go/src/gin-vue-admin
COPY --from=0 /go/src/gin-vue-admin/gva ./
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 initdb && ./server
+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
+15 -14
View File
@@ -1,19 +1,20 @@
FROM golang:alpine as builder
FROM golang:alpine
# 设置go mod proxy 国内代理
# 设置golang path
ENV GOPROXY=https://goproxy.cn,https://goproxy.io,direct \
GO111MODULE=on \
CGO_ENABLED=1
WORKDIR /ginvue
RUN go env -w GOPROXY=https://goproxy.cn,https://goproxy.io,direct
ENV GO111MODULE=on
ENV GOPROXY=https://goproxy.io,direct
WORKDIR /go/src/gin-vue-admin
COPY . .
RUN go env && go list && go build -o app main.go
RUN go env && go build -o server .
FROM alpine:latest
LABEL MAINTAINER="SliverHorn@sliver_horn@qq.com"
WORKDIR /go/src/gin-vue-admin
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 /ginvue/app
# 根据Dockerfile生成Docker镜像
# docker build -t ginvue .
# 根据Docker镜像启动Docker容器
# docker run -itd -p 8888:8888 --name ginvue ginvue
ENTRYPOINT ./server
+43
View File
@@ -0,0 +1,43 @@
.PHONY: all build run gotool clean help
BINARY="server"
GVA = "gva"
all: check gva initdb run
gva:
go build -o ${GVA} cmd/main.go
initdb:
@if [ -f ${GVA} ] ; then ./gva initdb && rm ${GVA} ; fi
linux-build:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build
windows-build:
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o ${BINARY}.exe
mac-build:
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o ${BINARY}
run:
@go run main.go
check:
go fmt ./
go vet ./
clean:
@if [ -f ${BINARY} ] ; then rm ${BINARY} ; fi
@if [ -f ${GVA} ] ; then rm ${GVA} ; fi
help:
@echo "make - 构建gva终端工具并初始化数据,初始化数据后删除gva终端工具,启动server项目"
@echo "make gva - 构建gva终端工具"
@echo "make initdb - 如果有gva终端工具就初始化数据,初始化数据后删除gva终端工具,没有则不会执行"
@echo "make linux-build - 编译 Go 代码, 生成Linux系统的二进制文件"
@echo "make windows-build - 编译 Go 代码, 生成Windows系统的exe文件"
@echo "make mac-build - 编译 Go 代码, 生成Mac系统的二进制文件"
@echo "make run - 直接运行 main.go"
@echo "make clean - 移除二进制文件"
@echo "make check - 运行 Go 工具 'fmt' and 'vet'"
+27 -17
View File
@@ -1,12 +1,12 @@
package v1
import (
"fmt"
"gin-vue-admin/global/response"
resp "gin-vue-admin/model/response"
"gin-vue-admin/global"
"gin-vue-admin/model/response"
"gin-vue-admin/service"
"gin-vue-admin/utils"
"github.com/gin-gonic/gin"
"go.uber.org/zap"
"io/ioutil"
"strconv"
)
@@ -17,7 +17,7 @@ import (
// @accept multipart/form-data
// @Produce application/json
// @Param file formData file true "an example for breakpoint resume, 断点续传示例"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"上传成功"}"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"切片创建成功"}"
// @Router /fileUploadAndDownload/breakpointContinue [post]
func BreakpointContinue(c *gin.Context) {
fileMd5 := c.Request.FormValue("fileMd5")
@@ -27,32 +27,39 @@ func BreakpointContinue(c *gin.Context) {
chunkTotal, _ := strconv.Atoi(c.Request.FormValue("chunkTotal"))
_, FileHeader, err := c.Request.FormFile("file")
if err != nil {
response.FailWithMessage(err.Error(), c)
global.GVA_LOG.Error("接收文件失败!", zap.Any("err", err))
response.FailWithMessage("接收文件失败", c)
return
}
f, err := FileHeader.Open()
if err != nil {
response.FailWithMessage(err.Error(), c)
global.GVA_LOG.Error("文件读取失败!", zap.Any("err", err))
response.FailWithMessage("文件读取失败", c)
return
}
defer f.Close()
cen, _ := ioutil.ReadAll(f)
if flag := utils.CheckMd5(cen, chunkMd5); !flag {
if !utils.CheckMd5(cen, chunkMd5) {
global.GVA_LOG.Error("检查md5失败!", zap.Any("err", err))
response.FailWithMessage("检查md5失败", c)
return
}
err, file := service.FindOrCreateFile(fileMd5, fileName, chunkTotal)
if err != nil {
response.FailWithMessage(err.Error(), c)
global.GVA_LOG.Error("查找或创建记录失败!", zap.Any("err", err))
response.FailWithMessage("查找或创建记录失败", c)
return
}
err, pathc := utils.BreakPointContinue(cen, fileName, chunkNumber, chunkTotal, fileMd5)
if err != nil {
response.FailWithMessage(err.Error(), c)
global.GVA_LOG.Error("断点续传失败!", zap.Any("err", err))
response.FailWithMessage("断点续传失败", c)
return
}
if err = service.CreateFileChunk(file.ID, pathc, chunkNumber); err != nil {
response.FailWithMessage(err.Error(), c)
global.GVA_LOG.Error("创建文件记录失败!", zap.Any("err", err))
response.FailWithMessage("创建文件记录失败", c)
return
}
response.OkWithMessage("切片创建成功", c)
@@ -72,14 +79,15 @@ func FindFile(c *gin.Context) {
chunkTotal, _ := strconv.Atoi(c.Query("chunkTotal"))
err, file := service.FindOrCreateFile(fileMd5, fileName, chunkTotal)
if err != nil {
global.GVA_LOG.Error("查找失败!", zap.Any("err", err))
response.FailWithMessage("查找失败", c)
} else {
response.OkWithData(resp.FileResponse{File: file}, c)
response.OkWithDetailed(response.FileResponse{File: file},"查找成功", c)
}
}
// @Tags ExaFileUploadAndDownload
// @Summary 查找文件
// @Summary 创建文件
// @Security ApiKeyAuth
// @accept multipart/form-data
// @Produce application/json
@@ -91,9 +99,10 @@ func BreakpointContinueFinish(c *gin.Context) {
fileName := c.Query("fileName")
err, filePath := utils.MakeFile(fileName, fileMd5)
if err != nil {
response.FailWithDetailed(response.ERROR, resp.FilePathResponse{FilePath: filePath}, fmt.Sprintf("文件创建失败:%v", err), c)
global.GVA_LOG.Error("文件创建失败!", zap.Any("err", err))
response.FailWithDetailed(response.FilePathResponse{FilePath: filePath}, "文件创建失败", c)
} else {
response.OkDetailed(resp.FilePathResponse{FilePath: filePath}, "文件创建成功", c)
response.OkWithDetailed(response.FilePathResponse{FilePath: filePath}, "文件创建成功", c)
}
}
@@ -103,7 +112,7 @@ func BreakpointContinueFinish(c *gin.Context) {
// @accept multipart/form-data
// @Produce application/json
// @Param file formData file true "删除缓存切片"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查找成功"}"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"缓存切片删除成功"}"
// @Router /fileUploadAndDownload/removeChunk [post]
func RemoveChunk(c *gin.Context) {
fileMd5 := c.Query("fileMd5")
@@ -112,8 +121,9 @@ func RemoveChunk(c *gin.Context) {
err := utils.RemoveChunk(fileMd5)
err = service.DeleteFileChunk(fileMd5, fileName, filePath)
if err != nil {
response.FailWithDetailed(response.ERROR, resp.FilePathResponse{FilePath: filePath}, fmt.Sprintf("缓存切片删除失败:%v", err), c)
global.GVA_LOG.Error("缓存切片删除失败!", zap.Any("err", err))
response.FailWithDetailed(response.FilePathResponse{FilePath: filePath},"缓存切片删除失败", c)
} else {
response.OkDetailed(resp.FilePathResponse{FilePath: filePath}, "缓存切片删除成功", c)
response.OkWithDetailed(response.FilePathResponse{FilePath: filePath}, "缓存切片删除成功", c)
}
}
+56 -80
View File
@@ -2,164 +2,140 @@ package v1
import (
"fmt"
"gin-vue-admin/global/response"
"gin-vue-admin/global"
"gin-vue-admin/model"
"gin-vue-admin/model/request"
resp "gin-vue-admin/model/response"
"gin-vue-admin/model/response"
"gin-vue-admin/service"
"gin-vue-admin/utils"
"github.com/gin-gonic/gin"
"go.uber.org/zap"
)
// @Tags SysApi
// @Tags ExaCustomer
// @Summary 创建客户
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.ExaCustomer true "创建客户"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Param data body model.ExaCustomer true "客户用户名, 客户手机号码"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /customer/customer [post]
func CreateExaCustomer(c *gin.Context) {
var cu model.ExaCustomer
_ = c.ShouldBindJSON(&cu)
CustomerVerify := utils.Rules{
"CustomerName": {utils.NotEmpty()},
"CustomerPhoneData": {utils.NotEmpty()},
}
CustomerVerifyErr := utils.Verify(cu, CustomerVerify)
if CustomerVerifyErr != nil {
response.FailWithMessage(CustomerVerifyErr.Error(), c)
var customer model.ExaCustomer
_ = c.ShouldBindJSON(&customer)
if err := utils.Verify(customer, utils.CustomerVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
claims, _ := c.Get("claims")
waitUse := claims.(*request.CustomClaims)
cu.SysUserID = waitUse.ID
cu.SysUserAuthorityID = waitUse.AuthorityId
err := service.CreateExaCustomer(cu)
if err != nil {
response.FailWithMessage(fmt.Sprintf("删除失败:%v", err), c)
customer.SysUserID = getUserID(c)
customer.SysUserAuthorityID = getUserAuthorityId(c)
if err := service.CreateExaCustomer(customer); err != nil {
global.GVA_LOG.Error("创建失败!", zap.Any("err", err))
response.FailWithMessage("创建失败", c)
} else {
response.OkWithMessage("创建成功", c)
}
}
// @Tags SysApi
// @Tags ExaCustomer
// @Summary 删除客户
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.ExaCustomer true "删除客户"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Param data body model.ExaCustomer true "客户ID"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /customer/customer [delete]
func DeleteExaCustomer(c *gin.Context) {
var cu model.ExaCustomer
_ = c.ShouldBindJSON(&cu)
CustomerVerify := utils.Rules{
"ID": {utils.NotEmpty()},
}
CustomerVerifyErr := utils.Verify(cu.Model, CustomerVerify)
if CustomerVerifyErr != nil {
response.FailWithMessage(CustomerVerifyErr.Error(), c)
var customer model.ExaCustomer
_ = c.ShouldBindJSON(&customer)
if err := utils.Verify(customer.GVA_MODEL, utils.IdVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
err := service.DeleteExaCustomer(cu)
if err != nil {
response.FailWithMessage(fmt.Sprintf("删除失败:%v", err), c)
if err := service.DeleteExaCustomer(customer); err != nil {
global.GVA_LOG.Error("删除失败!", zap.Any("err", err))
response.FailWithMessage("删除失败", c)
} else {
response.OkWithMessage("删除成功", c)
}
}
// @Tags SysApi
// @Tags ExaCustomer
// @Summary 更新客户信息
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.ExaCustomer true "创建客户"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Param data body model.ExaCustomer true "客户ID, 客户信息"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /customer/customer [put]
func UpdateExaCustomer(c *gin.Context) {
var cu model.ExaCustomer
_ = c.ShouldBindJSON(&cu)
IdCustomerVerify := utils.Rules{
"ID": {utils.NotEmpty()},
}
IdCustomerVerifyErr := utils.Verify(cu.Model, IdCustomerVerify)
if IdCustomerVerifyErr != nil {
response.FailWithMessage(IdCustomerVerifyErr.Error(), c)
var customer model.ExaCustomer
_ = c.ShouldBindJSON(&customer)
if err := utils.Verify(customer.GVA_MODEL, utils.IdVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
CustomerVerify := utils.Rules{
"CustomerName": {utils.NotEmpty()},
"CustomerPhoneData": {utils.NotEmpty()},
}
CustomerVerifyErr := utils.Verify(cu, CustomerVerify)
if CustomerVerifyErr != nil {
response.FailWithMessage(CustomerVerifyErr.Error(), c)
if err := utils.Verify(customer, utils.CustomerVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
err := service.UpdateExaCustomer(&cu)
if err != nil {
response.FailWithMessage(fmt.Sprintf("更新失败:%v", err), c)
if err := service.UpdateExaCustomer(&customer); err != nil {
global.GVA_LOG.Error("更新失败!", zap.Any("err", err))
response.FailWithMessage("更新失败!", c)
} else {
response.OkWithMessage("更新成功", c)
}
}
// @Tags SysApi
// @Tags ExaCustomer
// @Summary 获取单一客户信息
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.ExaCustomer true "获取单一客户信息"
// @Param data body model.ExaCustomer true "客户ID"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /customer/customer [get]
func GetExaCustomer(c *gin.Context) {
var cu model.ExaCustomer
_ = c.ShouldBindQuery(&cu)
IdCustomerVerify := utils.Rules{
"ID": {utils.NotEmpty()},
}
IdCustomerVerifyErr := utils.Verify(cu.Model, IdCustomerVerify)
if IdCustomerVerifyErr != nil {
response.FailWithMessage(IdCustomerVerifyErr.Error(), c)
var customer model.ExaCustomer
_ = c.ShouldBindQuery(&customer)
if err := utils.Verify(customer.GVA_MODEL, utils.IdVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
err, customer := service.GetExaCustomer(cu.ID)
err, data := service.GetExaCustomer(customer.ID)
if err != nil {
response.FailWithMessage(fmt.Sprintf("获取失败:%v", err), c)
global.GVA_LOG.Error("获取失败!", zap.Any("err", err))
response.FailWithMessage("获取失败", c)
} else {
response.OkWithData(resp.ExaCustomerResponse{Customer: customer}, c)
response.OkWithDetailed(response.ExaCustomerResponse{Customer: data}, "获取成功", c)
}
}
// @Tags SysApi
// @Summary 获取权限客户列表
// @Tags ExaCustomer
// @Summary 分页获取权限客户列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.PageInfo true "获取权限客户列表"
// @Param data body request.PageInfo true "页码, 每页大小"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /customer/customerList [get]
func GetExaCustomerList(c *gin.Context) {
claims, _ := c.Get("claims")
waitUse := claims.(*request.CustomClaims)
var pageInfo request.PageInfo
_ = c.ShouldBindQuery(&pageInfo)
PageVerifyErr := utils.Verify(pageInfo, utils.CustomizeMap["PageVerify"])
if PageVerifyErr != nil {
response.FailWithMessage(PageVerifyErr.Error(), c)
if err := utils.Verify(pageInfo, utils.PageInfoVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
err, customerList, total := service.GetCustomerInfoList(waitUse.AuthorityId, pageInfo)
err, customerList, total := service.GetCustomerInfoList(getUserAuthorityId(c), pageInfo)
if err != nil {
global.GVA_LOG.Error("获取失败!", zap.Any("err", err))
response.FailWithMessage(fmt.Sprintf("获取失败:%v", err), c)
} else {
response.OkWithData(resp.PageResult{
response.OkWithDetailed(response.PageResult{
List: customerList,
Total: total,
Page: pageInfo.Page,
PageSize: pageInfo.PageSize,
}, c)
}, "获取成功", c)
}
}
+25 -49
View File
@@ -1,15 +1,13 @@
package v1
import (
"fmt"
"gin-vue-admin/global/response"
"gin-vue-admin/global"
"gin-vue-admin/model"
"gin-vue-admin/model/request"
resp "gin-vue-admin/model/response"
"gin-vue-admin/model/response"
"gin-vue-admin/service"
"gin-vue-admin/utils"
"github.com/gin-gonic/gin"
"strings"
"go.uber.org/zap"
)
// @Tags ExaFileUploadAndDownload
@@ -21,33 +19,21 @@ import (
// @Success 200 {string} string "{"success":true,"data":{},"msg":"上传成功"}"
// @Router /fileUploadAndDownload/upload [post]
func UploadFile(c *gin.Context) {
var file model.ExaFileUploadAndDownload
noSave := c.DefaultQuery("noSave", "0")
_, header, err := c.Request.FormFile("file")
if err != nil {
response.FailWithMessage(fmt.Sprintf("上传文件失败,%v", err), c)
} else {
// 文件上传后拿到文件路径
err, filePath, key := utils.Upload(header)
if err != nil {
response.FailWithMessage(fmt.Sprintf("接收返回值失败,%v", err), c)
} else {
// 修改数据库后得到修改后的user并且返回供前端使用
var file model.ExaFileUploadAndDownload
file.Url = filePath
file.Name = header.Filename
s := strings.Split(file.Name, ".")
file.Tag = s[len(s)-1]
file.Key = key
if noSave == "0" {
err = service.Upload(file)
}
if err != nil {
response.FailWithMessage(fmt.Sprintf("修改数据库链接失败,%v", err), c)
} else {
response.OkDetailed(resp.ExaFileResponse{File: file}, "上传成功", c)
}
}
global.GVA_LOG.Error("接收文件失败!", zap.Any("err", err))
response.FailWithMessage("接收文件失败", c)
return
}
err, file = service.UploadFile(header, noSave) // 文件上传后拿到文件路径
if err != nil {
global.GVA_LOG.Error("修改数据库链接失败!", zap.Any("err", err))
response.FailWithMessage("修改数据库链接失败", c)
return
}
response.OkWithDetailed(response.ExaFileResponse{File: file}, "上传成功", c)
}
// @Tags ExaFileUploadAndDownload
@@ -55,28 +41,17 @@ func UploadFile(c *gin.Context) {
// @Security ApiKeyAuth
// @Produce application/json
// @Param data body model.ExaFileUploadAndDownload true "传入文件里面id即可"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"返回成功"}"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /fileUploadAndDownload/deleteFile [post]
func DeleteFile(c *gin.Context) {
var file model.ExaFileUploadAndDownload
_ = c.ShouldBindJSON(&file)
err, f := service.FindFile(file.ID)
if err != nil {
response.FailWithMessage(fmt.Sprintf("删除失败,%v", err), c)
} else {
err = utils.DeleteFile(f.Key)
if err != nil {
response.FailWithMessage(fmt.Sprintf("删除失败,%v", err), c)
} else {
err = service.DeleteFile(f)
if err != nil {
response.FailWithMessage(fmt.Sprintf("删除失败,%v", err), c)
} else {
response.OkWithMessage("删除成功", c)
}
}
if err := service.DeleteFile(file); err != nil {
global.GVA_LOG.Error("删除失败!", zap.Any("err", err))
response.FailWithMessage("删除失败", c)
return
}
response.OkWithMessage("删除成功", c)
}
// @Tags ExaFileUploadAndDownload
@@ -84,7 +59,7 @@ func DeleteFile(c *gin.Context) {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.PageInfo true "分页获取文件户列表"
// @Param data body request.PageInfo true "页码, 每页大小"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /fileUploadAndDownload/getFileList [post]
func GetFileList(c *gin.Context) {
@@ -92,13 +67,14 @@ func GetFileList(c *gin.Context) {
_ = c.ShouldBindJSON(&pageInfo)
err, list, total := service.GetFileRecordInfoList(pageInfo)
if err != nil {
response.FailWithMessage(fmt.Sprintf("获取数据失败,%v", err), c)
global.GVA_LOG.Error("获取失败!", zap.Any("err", err))
response.FailWithMessage("获取失败", c)
} else {
response.OkWithData(resp.PageResult{
response.OkWithDetailed(response.PageResult{
List: list,
Total: total,
Page: pageInfo.Page,
PageSize: pageInfo.PageSize,
}, c)
},"获取成功", c)
}
}
+93
View File
@@ -0,0 +1,93 @@
package v1
import (
"gin-vue-admin/global"
"gin-vue-admin/model"
"gin-vue-admin/model/response"
"gin-vue-admin/service"
"gin-vue-admin/utils"
"github.com/gin-gonic/gin"
"go.uber.org/zap"
)
// @Tags SimpleUploader
// @Summary 断点续传插件版示例
// @Security ApiKeyAuth
// @accept multipart/form-data
// @Produce application/json
// @Param file formData file true "断点续传插件版示例"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"切片创建成功"}"
// @Router /simpleUploader/upload [post]
func SimpleUploaderUpload(c *gin.Context) {
var chunk model.ExaSimpleUploader
_, header, err := c.Request.FormFile("file")
chunk.Filename = c.PostForm("filename")
chunk.ChunkNumber = c.PostForm("chunkNumber")
chunk.CurrentChunkSize = c.PostForm("currentChunkSize")
chunk.Identifier = c.PostForm("identifier")
chunk.TotalSize = c.PostForm("totalSize")
chunk.TotalChunks = c.PostForm("totalChunks")
var chunkDir = "./chunk/" + chunk.Identifier + "/"
hasDir, _ := utils.PathExists(chunkDir)
if !hasDir {
if err := utils.CreateDir(chunkDir); err != nil {
global.GVA_LOG.Error("创建目录失败!", zap.Any("err", err))
}
}
chunkPath := chunkDir + chunk.Filename + chunk.ChunkNumber
err = c.SaveUploadedFile(header, chunkPath)
if err != nil {
global.GVA_LOG.Error("切片创建失败!", zap.Any("err", err))
response.FailWithMessage("切片创建失败", c)
return
}
chunk.CurrentChunkPath = chunkPath
err = service.SaveChunk(chunk)
if err != nil {
global.GVA_LOG.Error("切片创建失败!", zap.Any("err", err))
response.FailWithMessage("切片创建失败", c)
return
} else {
response.OkWithMessage("切片创建成功", c)
}
}
// @Tags SimpleUploader
// @Summary 断点续传插件版示例
// @Security ApiKeyAuth
// @Produce application/json
// @Param md5 query string true "md5"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /simpleUploader/checkFileMd5 [get]
func CheckFileMd5(c *gin.Context) {
md5 := c.Query("md5")
err, chunks, isDone := service.CheckFileMd5(md5)
if err != nil {
global.GVA_LOG.Error("md5读取失败!", zap.Any("err", err))
response.FailWithMessage("md5读取失败", c)
} else {
response.OkWithDetailed(gin.H{
"chunks": chunks,
"isDone": isDone,
},"查询成功", c)
}
}
// @Tags SimpleUploader
// @Summary 合并文件
// @Security ApiKeyAuth
// @Produce application/json
// @Param md5 query string true "md5"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"合并成功"}"
// @Router /simpleUploader/mergeFileMd5 [get]
func MergeFileMd5(c *gin.Context) {
md5 := c.Query("md5")
fileName := c.Query("fileName")
err := service.MergeFileMd5(md5, fileName)
if err != nil {
global.GVA_LOG.Error("md5读取失败!", zap.Any("err", err))
response.FailWithMessage("md5读取失败", c)
} else {
response.OkWithMessage("合并成功", c)
}
}
+48 -70
View File
@@ -1,14 +1,14 @@
package v1
import (
"fmt"
"gin-vue-admin/global/response"
"gin-vue-admin/global"
"gin-vue-admin/model"
"gin-vue-admin/model/request"
resp "gin-vue-admin/model/response"
"gin-vue-admin/model/response"
"gin-vue-admin/service"
"gin-vue-admin/utils"
"github.com/gin-gonic/gin"
"go.uber.org/zap"
)
// @Tags SysApi
@@ -16,60 +16,47 @@ import (
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.SysApi true "创建api"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Param data body model.SysApi true "api路径, api中文描述, api组, 方法"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /api/createApi [post]
func CreateApi(c *gin.Context) {
var api model.SysApi
_ = c.ShouldBindJSON(&api)
ApiVerify := utils.Rules{
"Path": {utils.NotEmpty()},
"Description": {utils.NotEmpty()},
"ApiGroup": {utils.NotEmpty()},
"Method": {utils.NotEmpty()},
}
ApiVerifyErr := utils.Verify(api, ApiVerify)
if ApiVerifyErr != nil {
response.FailWithMessage(ApiVerifyErr.Error(), c)
if err := utils.Verify(api, utils.ApiVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
err := service.CreateApi(api)
if err != nil {
response.FailWithMessage(fmt.Sprintf("创建失败,%v", err), c)
if err := service.CreateApi(api); err != nil {
global.GVA_LOG.Error("创建失败!", zap.Any("err", err))
response.FailWithMessage("创建失败", c)
} else {
response.OkWithMessage("创建成功", c)
}
}
// @Tags SysApi
// @Summary 删除指定api
// @Summary 删除api
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.SysApi true "删除api"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Param data body model.SysApi true "ID"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /api/deleteApi [post]
func DeleteApi(c *gin.Context) {
var a model.SysApi
_ = c.ShouldBindJSON(&a)
ApiVerify := utils.Rules{
"ID": {utils.NotEmpty()},
}
ApiVerifyErr := utils.Verify(a.Model, ApiVerify)
if ApiVerifyErr != nil {
response.FailWithMessage(ApiVerifyErr.Error(), c)
var api model.SysApi
_ = c.ShouldBindJSON(&api)
if err := utils.Verify(api.GVA_MODEL, utils.IdVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
err := service.DeleteApi(a)
if err != nil {
response.FailWithMessage(fmt.Sprintf("删除失败,%v", err), c)
if err := service.DeleteApi(api); err != nil {
global.GVA_LOG.Error("删除失败!", zap.Any("err", err))
response.FailWithMessage("删除失败", c)
} else {
response.OkWithMessage("删除成功", c)
}
}
// 条件搜索后端看此api
// @Tags SysApi
// @Summary 分页获取API列表
// @Security ApiKeyAuth
@@ -79,24 +66,22 @@ func DeleteApi(c *gin.Context) {
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /api/getApiList [post]
func GetApiList(c *gin.Context) {
// 此结构体仅本方法使用
var sp request.SearchApiParams
_ = c.ShouldBindJSON(&sp)
PageVerifyErr := utils.Verify(sp.PageInfo, utils.CustomizeMap["PageVerify"])
if PageVerifyErr != nil {
response.FailWithMessage(PageVerifyErr.Error(), c)
var pageInfo request.SearchApiParams
_ = c.ShouldBindJSON(&pageInfo)
if err := utils.Verify(pageInfo.PageInfo, utils.PageInfoVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
err, list, total := service.GetAPIInfoList(sp.SysApi, sp.PageInfo, sp.OrderKey, sp.Desc)
if err != nil {
response.FailWithMessage(fmt.Sprintf("获取数据失败,%v", err), c)
if err, list, total := service.GetAPIInfoList(pageInfo.SysApi, pageInfo.PageInfo, pageInfo.OrderKey, pageInfo.Desc); err != nil {
global.GVA_LOG.Error("获取失败!", zap.Any("err", err))
response.FailWithMessage("获取失败", c)
} else {
response.OkWithData(resp.PageResult{
response.OkWithDetailed(response.PageResult{
List: list,
Total: total,
Page: sp.PageInfo.Page,
PageSize: sp.PageInfo.PageSize,
}, c)
Page: pageInfo.Page,
PageSize: pageInfo.PageSize,
}, "获取成功", c)
}
}
@@ -111,16 +96,16 @@ func GetApiList(c *gin.Context) {
func GetApiById(c *gin.Context) {
var idInfo request.GetById
_ = c.ShouldBindJSON(&idInfo)
IdVerifyErr := utils.Verify(idInfo, utils.CustomizeMap["IdVerify"])
if IdVerifyErr != nil {
response.FailWithMessage(IdVerifyErr.Error(), c)
if err := utils.Verify(idInfo, utils.IdVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
err, api := service.GetApiById(idInfo.Id)
if err != nil {
response.FailWithMessage(fmt.Sprintf("获取数据失败,%v", err), c)
global.GVA_LOG.Error("获取失败!", zap.Any("err", err))
response.FailWithMessage("获取失败", c)
} else {
response.OkWithData(resp.SysAPIResponse{Api: api}, c)
response.OkWithData(response.SysAPIResponse{Api: api}, c)
}
}
@@ -129,28 +114,21 @@ func GetApiById(c *gin.Context) {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.SysApi true "创建api"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Param data body model.SysApi true "api路径, api中文描述, api组, 方法"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"修改成功"}"
// @Router /api/updateApi [post]
func UpdateApi(c *gin.Context) {
var api model.SysApi
_ = c.ShouldBindJSON(&api)
ApiVerify := utils.Rules{
"Path": {utils.NotEmpty()},
"Description": {utils.NotEmpty()},
"ApiGroup": {utils.NotEmpty()},
"Method": {utils.NotEmpty()},
}
ApiVerifyErr := utils.Verify(api, ApiVerify)
if ApiVerifyErr != nil {
response.FailWithMessage(ApiVerifyErr.Error(), c)
if err := utils.Verify(api, utils.ApiVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
err := service.UpdateApi(api)
if err != nil {
response.FailWithMessage(fmt.Sprintf("修改数据失败,%v", err), c)
if err := service.UpdateApi(api); err != nil {
global.GVA_LOG.Error("修改失败!", zap.Any("err", err))
response.FailWithMessage("修改失败", c)
} else {
response.OkWithMessage("修改数据成功", c)
response.OkWithMessage("修改成功", c)
}
}
@@ -162,10 +140,10 @@ func UpdateApi(c *gin.Context) {
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /api/getAllApis [post]
func GetAllApis(c *gin.Context) {
err, apis := service.GetAllApis()
if err != nil {
response.FailWithMessage(fmt.Sprintf("获取数据失败,%v", err), c)
if err, apis := service.GetAllApis(); err != nil {
global.GVA_LOG.Error("获取失败!", zap.Any("err", err))
response.FailWithMessage("获取失败", c)
} else {
response.OkWithData(resp.SysAPIListResponse{Apis: apis}, c)
response.OkWithDetailed(response.SysAPIListResponse{Apis: apis}, "获取成功", c)
}
}
+60 -86
View File
@@ -1,166 +1,141 @@
package v1
import (
"fmt"
"gin-vue-admin/global/response"
"gin-vue-admin/global"
"gin-vue-admin/model"
"gin-vue-admin/model/request"
resp "gin-vue-admin/model/response"
"gin-vue-admin/model/response"
"gin-vue-admin/service"
"gin-vue-admin/utils"
"github.com/gin-gonic/gin"
"go.uber.org/zap"
)
// @Tags authority
// @Tags Authority
// @Summary 创建角色
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.SysAuthority true "创建角色"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Param data body model.SysAuthority true "权限id, 权限名, 父角色id"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /authority/createAuthority [post]
func CreateAuthority(c *gin.Context) {
var auth model.SysAuthority
_ = c.ShouldBindJSON(&auth)
AuthorityVerify := utils.Rules{
"AuthorityId": {utils.NotEmpty()},
"AuthorityName": {utils.NotEmpty()},
"ParentId": {utils.NotEmpty()},
}
AuthorityVerifyErr := utils.Verify(auth, AuthorityVerify)
if AuthorityVerifyErr != nil {
response.FailWithMessage(AuthorityVerifyErr.Error(), c)
var authority model.SysAuthority
_ = c.ShouldBindJSON(&authority)
if err := utils.Verify(authority, utils.AuthorityVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
err, authBack := service.CreateAuthority(auth)
if err != nil {
response.FailWithMessage(fmt.Sprintf("创建失败,%v", err), c)
if err, authBack := service.CreateAuthority(authority); err != nil {
global.GVA_LOG.Error("创建失败!", zap.Any("err", err))
response.FailWithMessage("创建失败"+err.Error(), c)
} else {
response.OkWithData(resp.SysAuthorityResponse{Authority: authBack}, c)
response.OkWithDetailed(response.SysAuthorityResponse{Authority: authBack}, "创建成功", c)
}
}
// @Tags authority
// @Tags Authority
// @Summary 拷贝角色
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body response.SysAuthorityCopyResponse true "拷贝角色"
// @Param data body response.SysAuthorityCopyResponse true "旧角色id, 新权限id, 新权限名, 新父角色id"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"拷贝成功"}"
// @Router /authority/copyAuthority [post]
func CopyAuthority(c *gin.Context) {
var copyInfo resp.SysAuthorityCopyResponse
var copyInfo response.SysAuthorityCopyResponse
_ = c.ShouldBindJSON(&copyInfo)
OldAuthorityVerify := utils.Rules{
"OldAuthorityId": {utils.NotEmpty()},
}
OldAuthorityVerifyErr := utils.Verify(copyInfo, OldAuthorityVerify)
if OldAuthorityVerifyErr != nil {
response.FailWithMessage(OldAuthorityVerifyErr.Error(), c)
if err := utils.Verify(copyInfo, utils.OldAuthorityVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
AuthorityVerify := utils.Rules{
"AuthorityId": {utils.NotEmpty()},
"AuthorityName": {utils.NotEmpty()},
"ParentId": {utils.NotEmpty()},
}
AuthorityVerifyErr := utils.Verify(copyInfo.Authority, AuthorityVerify)
if AuthorityVerifyErr != nil {
response.FailWithMessage(AuthorityVerifyErr.Error(), c)
if err := utils.Verify(copyInfo.Authority, utils.AuthorityVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
err, authBack := service.CopyAuthority(copyInfo)
if err != nil {
response.FailWithMessage(fmt.Sprintf("拷贝失败,%v", err), c)
if err, authBack := service.CopyAuthority(copyInfo); err != nil {
global.GVA_LOG.Error("拷贝失败!", zap.Any("err", err))
response.FailWithMessage("拷贝失败"+err.Error(), c)
} else {
response.OkWithData(resp.SysAuthorityResponse{Authority: authBack}, c)
response.OkWithDetailed(response.SysAuthorityResponse{Authority: authBack}, "拷贝成功", c)
}
}
// @Tags authority
// @Tags Authority
// @Summary 删除角色
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.SysAuthority true "删除角色"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /authority/deleteAuthority [post]
func DeleteAuthority(c *gin.Context) {
var a model.SysAuthority
_ = c.ShouldBindJSON(&a)
AuthorityIdVerifyErr := utils.Verify(a, utils.CustomizeMap["AuthorityIdVerify"])
if AuthorityIdVerifyErr != nil {
response.FailWithMessage(AuthorityIdVerifyErr.Error(), c)
var authority model.SysAuthority
_ = c.ShouldBindJSON(&authority)
if err := utils.Verify(authority, utils.AuthorityIdVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
// 删除角色之前需要判断是否有用户正在使用此角色
err := service.DeleteAuthority(&a)
if err != nil {
response.FailWithMessage(fmt.Sprintf("删除失败,%v", err), c)
if err := service.DeleteAuthority(&authority); err != nil { // 删除角色之前需要判断是否有用户正在使用此角色
global.GVA_LOG.Error("删除失败!", zap.Any("err", err))
response.FailWithMessage("删除失败"+err.Error(), c)
} else {
response.OkWithMessage("删除成功", c)
}
}
// @Tags authority
// @Summary 设置角色资源权限
// @Tags Authority
// @Summary 更新角色信息
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.SysAuthority true "设置角色资源权限"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"设置成功"}"
// @Param data body model.SysAuthority true "权限id, 权限名, 父角色id"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /authority/updateAuthority [post]
func UpdateAuthority(c *gin.Context) {
var auth model.SysAuthority
_ = c.ShouldBindJSON(&auth)
AuthorityVerify := utils.Rules{
"AuthorityId": {utils.NotEmpty()},
"AuthorityName": {utils.NotEmpty()},
"ParentId": {utils.NotEmpty()},
}
AuthorityVerifyErr := utils.Verify(auth, AuthorityVerify)
if AuthorityVerifyErr != nil {
response.FailWithMessage(AuthorityVerifyErr.Error(), c)
if err := utils.Verify(auth, utils.AuthorityVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
err, authority := service.UpdateAuthority(auth)
if err != nil {
response.FailWithMessage(fmt.Sprintf("更新失败,%v", err), c)
if err, authority := service.UpdateAuthority(auth); err != nil {
global.GVA_LOG.Error("更新失败!", zap.Any("err", err))
response.FailWithMessage("更新失败"+err.Error(), c)
} else {
response.OkWithData(resp.SysAuthorityResponse{Authority: authority}, c)
response.OkWithDetailed(response.SysAuthorityResponse{Authority: authority}, "更新成功", c)
}
}
// @Tags authority
// @Tags Authority
// @Summary 分页获取角色列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.PageInfo true "分页获取用户列表"
// @Param data body request.PageInfo true "页码, 每页大小"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /authority/getAuthorityList [post]
func GetAuthorityList(c *gin.Context) {
var pageInfo request.PageInfo
_ = c.ShouldBindJSON(&pageInfo)
PageVerifyErr := utils.Verify(pageInfo, utils.CustomizeMap["PageVerify"])
if PageVerifyErr != nil {
response.FailWithMessage(PageVerifyErr.Error(), c)
if err := utils.Verify(pageInfo, utils.PageInfoVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
err, list, total := service.GetAuthorityInfoList(pageInfo)
if err != nil {
response.FailWithMessage(fmt.Sprintf("获取数据失败,%v", err), c)
if err, list, total := service.GetAuthorityInfoList(pageInfo); err != nil {
global.GVA_LOG.Error("获取失败!", zap.Any("err", err))
response.FailWithMessage("获取失败"+err.Error(), c)
} else {
response.OkWithData(resp.PageResult{
response.OkWithDetailed(response.PageResult{
List: list,
Total: total,
Page: pageInfo.Page,
PageSize: pageInfo.PageSize,
}, c)
}, "获取成功", c)
}
}
// @Tags authority
// @Tags Authority
// @Summary 设置角色资源权限
// @Security ApiKeyAuth
// @accept application/json
@@ -171,15 +146,14 @@ func GetAuthorityList(c *gin.Context) {
func SetDataAuthority(c *gin.Context) {
var auth model.SysAuthority
_ = c.ShouldBindJSON(&auth)
AuthorityIdVerifyErr := utils.Verify(auth, utils.CustomizeMap["AuthorityIdVerify"])
if AuthorityIdVerifyErr != nil {
response.FailWithMessage(AuthorityIdVerifyErr.Error(), c)
if err := utils.Verify(auth, utils.AuthorityIdVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
err := service.SetDataAuthority(auth)
if err != nil {
response.FailWithMessage(fmt.Sprintf("设置关联失败,%v", err), c)
if err := service.SetDataAuthority(auth); err != nil {
global.GVA_LOG.Error("设置失败!", zap.Any("err", err))
response.FailWithMessage("设置失败"+err.Error(), c)
} else {
response.Ok(c)
response.OkWithMessage("设置成功", c)
}
}
+75 -53
View File
@@ -2,16 +2,19 @@ package v1
import (
"fmt"
"gin-vue-admin/global/response"
"gin-vue-admin/global"
"gin-vue-admin/model"
"gin-vue-admin/model/response"
"gin-vue-admin/service"
"gin-vue-admin/utils"
"github.com/gin-gonic/gin"
"github.com/pkg/errors"
"go.uber.org/zap"
"net/url"
"os"
)
// @Tags SysApi
// @Tags AutoCode
// @Summary 自动代码模板
// @Security ApiKeyAuth
// @accept application/json
@@ -22,68 +25,87 @@ import (
func CreateTemp(c *gin.Context) {
var a model.AutoCodeStruct
_ = c.ShouldBindJSON(&a)
AutoCodeVerify := utils.Rules{
"Abbreviation": {utils.NotEmpty()},
"StructName": {utils.NotEmpty()},
"PackageName": {utils.NotEmpty()},
"Fields": {utils.NotEmpty()},
}
WKVerifyErr := utils.Verify(a, AutoCodeVerify)
if WKVerifyErr != nil {
response.FailWithMessage(WKVerifyErr.Error(), c)
if err := utils.Verify(a, utils.AutoCodeVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
if a.AutoCreateApiToSql {
apiList := [5]model.SysApi{
{
Path: "/" + a.Abbreviation + "/" + "create" + a.StructName,
Description: "新增" + a.StructName,
ApiGroup: a.Abbreviation,
Method: "POST",
},
{
Path: "/" + a.Abbreviation + "/" + "delete" + a.StructName,
Description: "删除" + a.StructName,
ApiGroup: a.Abbreviation,
Method: "DELETE",
},
{
Path: "/" + a.Abbreviation + "/" + "update" + a.StructName,
Description: "更新" + a.StructName,
ApiGroup: a.Abbreviation,
Method: "PUT",
},
{
Path: "/" + a.Abbreviation + "/" + "find" + a.StructName,
Description: "根据ID获取" + a.StructName,
ApiGroup: a.Abbreviation,
Method: "GET",
},
{
Path: "/" + a.Abbreviation + "/" + "get" + a.StructName + "List",
Description: "获取" + a.StructName + "列表",
ApiGroup: a.Abbreviation,
Method: "GET",
},
}
for _, v := range apiList {
errC := service.CreateApi(v)
if errC != nil {
c.Writer.Header().Add("success", "false")
c.Writer.Header().Add("msg", url.QueryEscape(fmt.Sprintf("自动化创建失败,%v,请自行清空垃圾数据", errC)))
return
}
if err := service.AutoCreateApi(&a); err != nil {
global.GVA_LOG.Error("自动化创建失败!请自行清空垃圾数据!", zap.Any("err", err))
c.Writer.Header().Add("success", "false")
c.Writer.Header().Add("msg", url.QueryEscape("自动化创建失败!请自行清空垃圾数据!"))
return
}
}
err := service.CreateTemp(a)
if err != nil {
response.FailWithMessage(fmt.Sprintf("创建失败,%v", err), c)
os.Remove("./ginvueadmin.zip")
if errors.Is(err, model.AutoMoveErr) {
c.Writer.Header().Add("success", "false")
c.Writer.Header().Add("msgtype", "success")
c.Writer.Header().Add("msg", url.QueryEscape(err.Error()))
} else {
c.Writer.Header().Add("success", "false")
c.Writer.Header().Add("msg", url.QueryEscape(err.Error()))
_ = os.Remove("./ginvueadmin.zip")
}
} else {
c.Writer.Header().Add("Content-Disposition", fmt.Sprintf("attachment; filename=%s", "ginvueadmin.zip")) // fmt.Sprintf("attachment; filename=%s", filename)对下载的文件重命名
c.Writer.Header().Add("Content-Type", "application/json")
c.Writer.Header().Add("success", "true")
c.File("./ginvueadmin.zip")
os.Remove("./ginvueadmin.zip")
_ = os.Remove("./ginvueadmin.zip")
}
}
// @Tags AutoCode
// @Summary 获取当前数据库所有表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /autoCode/getTables [get]
func GetTables(c *gin.Context) {
dbName := c.DefaultQuery("dbName", global.GVA_CONFIG.Mysql.Dbname)
err, tables := service.GetTables(dbName)
if err != nil {
global.GVA_LOG.Error("查询table失败!", zap.Any("err", err))
response.FailWithMessage("查询table失败", c)
} else {
response.OkWithDetailed(gin.H{"tables": tables}, "获取成功", c)
}
}
// @Tags AutoCode
// @Summary 获取当前所有数据库
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /autoCode/getDatabase [get]
func GetDB(c *gin.Context) {
if err, dbs := service.GetDB(); err != nil {
global.GVA_LOG.Error("获取失败!", zap.Any("err", err))
response.FailWithMessage("获取失败", c)
} else {
response.OkWithDetailed(gin.H{"dbs": dbs}, "获取成功", c)
}
}
// @Tags AutoCode
// @Summary 获取当前表所有字段
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /autoCode/getColumn [get]
func GetColumn(c *gin.Context) {
dbName := c.DefaultQuery("dbName", global.GVA_CONFIG.Mysql.Dbname)
tableName := c.Query("tableName")
if err, columns := service.GetColumn(tableName, dbName); err != nil {
global.GVA_LOG.Error("获取失败!", zap.Any("err", err))
response.FailWithMessage("获取失败", c)
} else {
response.OkWithDetailed(gin.H{"columns": columns}, "获取成功", c)
}
}
+20 -22
View File
@@ -2,35 +2,33 @@ package v1
import (
"gin-vue-admin/global"
"gin-vue-admin/global/response"
resp "gin-vue-admin/model/response"
"gin-vue-admin/utils"
"github.com/dchest/captcha"
"gin-vue-admin/model/response"
"github.com/gin-gonic/gin"
"github.com/mojocn/base64Captcha"
"go.uber.org/zap"
)
// @Tags base
var store = base64Captcha.DefaultMemStore
// @Tags Base
// @Summary 生成验证码
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"验证码获取成功"}"
// @Router /base/captcha [post]
func Captcha(c *gin.Context) {
captchaId := captcha.NewLen(global.GVA_CONFIG.Captcha.KeyLong)
response.OkDetailed(resp.SysCaptchaResponse{
CaptchaId: captchaId,
PicPath: "/base/captcha/" + captchaId + ".png",
}, "验证码获取成功", c)
}
// @Tags base
// @Summary 生成验证码图片路径
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /base/captcha/:captchaId [get]
func CaptchaImg(c *gin.Context) {
utils.GinCaptchaServeHTTP(c.Writer, c.Request)
//字符,公式,验证码配置
// 生成默认数字的driver
driver := base64Captcha.NewDriverDigit(global.GVA_CONFIG.Captcha.ImgHeight, global.GVA_CONFIG.Captcha.ImgWidth, global.GVA_CONFIG.Captcha.KeyLong, 0.7, 80)
cp := base64Captcha.NewCaptcha(driver, store)
if id, b64s, err := cp.Generate(); err != nil {
global.GVA_LOG.Error("验证码获取失败!", zap.Any("err", err))
response.FailWithMessage("验证码获取失败", c)
} else {
response.OkWithDetailed(response.SysCaptchaResponse{
CaptchaId: id,
PicPath: b64s,
}, "验证码获取成功", c)
}
}
+21 -37
View File
@@ -1,70 +1,54 @@
package v1
import (
"fmt"
"gin-vue-admin/global/response"
"gin-vue-admin/global"
"gin-vue-admin/model/request"
resp "gin-vue-admin/model/response"
"gin-vue-admin/model/response"
"gin-vue-admin/service"
"gin-vue-admin/utils"
"github.com/gin-gonic/gin"
"go.uber.org/zap"
)
// @Tags casbin
// @Summary 更改角色api权限
// @Tags Casbin
// @Summary 更新角色api权限
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.CasbinInReceive true "更改角色api权限"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Param data body request.CasbinInReceive true "权限id, 权限模型列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /casbin/UpdateCasbin [post]
func UpdateCasbin(c *gin.Context) {
var cmr request.CasbinInReceive
_ = c.ShouldBindJSON(&cmr)
AuthorityIdVerifyErr := utils.Verify(cmr, utils.CustomizeMap["AuthorityIdVerify"])
if AuthorityIdVerifyErr != nil {
response.FailWithMessage(AuthorityIdVerifyErr.Error(), c)
if err := utils.Verify(cmr, utils.AuthorityIdVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
err := service.UpdateCasbin(cmr.AuthorityId, cmr.CasbinInfos)
if err != nil {
response.FailWithMessage(fmt.Sprintf("添加规则失败,%v", err), c)
if err := service.UpdateCasbin(cmr.AuthorityId, cmr.CasbinInfos); err != nil {
global.GVA_LOG.Error("更新失败!", zap.Any("err", err))
response.FailWithMessage("更新失败", c)
} else {
response.OkWithMessage("添加规则成功", c)
response.OkWithMessage("更新成功", c)
}
}
// @Tags casbin
// @Tags Casbin
// @Summary 获取权限列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.CasbinInReceive true "获取权限列表"
// @Param data body request.CasbinInReceive true "权限id, 权限模型列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /casbin/getPolicyPathByAuthorityId [post]
func GetPolicyPathByAuthorityId(c *gin.Context) {
var cmr request.CasbinInReceive
_ = c.ShouldBindJSON(&cmr)
AuthorityIdVerifyErr := utils.Verify(cmr, utils.CustomizeMap["AuthorityIdVerify"])
if AuthorityIdVerifyErr != nil {
response.FailWithMessage(AuthorityIdVerifyErr.Error(), c)
var casbin request.CasbinInReceive
_ = c.ShouldBindJSON(&casbin)
if err := utils.Verify(casbin, utils.AuthorityIdVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
paths := service.GetPolicyPathByAuthorityId(cmr.AuthorityId)
response.OkWithData(resp.PolicyPathResponse{Paths: paths}, c)
paths := service.GetPolicyPathByAuthorityId(casbin.AuthorityId)
response.OkWithDetailed(response.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)
}
+116
View File
@@ -0,0 +1,116 @@
package v1
import (
"gin-vue-admin/global"
"gin-vue-admin/model"
"gin-vue-admin/model/request"
"gin-vue-admin/model/response"
"gin-vue-admin/service"
"gin-vue-admin/utils"
"github.com/gin-gonic/gin"
"go.uber.org/zap"
)
// @Tags SysDictionary
// @Summary 创建SysDictionary
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.SysDictionary true "SysDictionary模型"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /sysDictionary/createSysDictionary [post]
func CreateSysDictionary(c *gin.Context) {
var dictionary model.SysDictionary
_ = c.ShouldBindJSON(&dictionary)
if err := service.CreateSysDictionary(dictionary); err != nil {
global.GVA_LOG.Error("创建失败!", zap.Any("err", err))
response.FailWithMessage("创建失败", c)
} else {
response.OkWithMessage("创建成功", c)
}
}
// @Tags SysDictionary
// @Summary 删除SysDictionary
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.SysDictionary true "SysDictionary模型"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /sysDictionary/deleteSysDictionary [delete]
func DeleteSysDictionary(c *gin.Context) {
var dictionary model.SysDictionary
_ = c.ShouldBindJSON(&dictionary)
if err := service.DeleteSysDictionary(dictionary); err != nil {
global.GVA_LOG.Error("删除失败!", zap.Any("err", err))
response.FailWithMessage("删除失败", c)
} else {
response.OkWithMessage("删除成功", c)
}
}
// @Tags SysDictionary
// @Summary 更新SysDictionary
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.SysDictionary true "SysDictionary模型"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /sysDictionary/updateSysDictionary [put]
func UpdateSysDictionary(c *gin.Context) {
var dictionary model.SysDictionary
_ = c.ShouldBindJSON(&dictionary)
if err := service.UpdateSysDictionary(&dictionary); err != nil {
global.GVA_LOG.Error("更新失败!", zap.Any("err", err))
response.FailWithMessage("更新失败", c)
} else {
response.OkWithMessage("更新成功", c)
}
}
// @Tags SysDictionary
// @Summary 用id查询SysDictionary
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.SysDictionary true "ID或字典英名"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /sysDictionary/findSysDictionary [get]
func FindSysDictionary(c *gin.Context) {
var dictionary model.SysDictionary
_ = c.ShouldBindQuery(&dictionary)
if err, sysDictionary := service.GetSysDictionary(dictionary.Type, dictionary.ID); err != nil {
global.GVA_LOG.Error("查询失败!", zap.Any("err", err))
response.FailWithMessage("查询失败", c)
} else {
response.OkWithDetailed(gin.H{"resysDictionary": sysDictionary}, "查询成功", c)
}
}
// @Tags SysDictionary
// @Summary 分页获取SysDictionary列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.SysDictionarySearch true "页码, 每页大小, 搜索条件"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /sysDictionary/getSysDictionaryList [get]
func GetSysDictionaryList(c *gin.Context) {
var pageInfo request.SysDictionarySearch
_ = c.ShouldBindQuery(&pageInfo)
if err := utils.Verify(pageInfo.PageInfo, utils.PageInfoVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
if err, list, total := service.GetSysDictionaryInfoList(pageInfo); err != nil {
global.GVA_LOG.Error("获取失败!", zap.Any("err", err))
response.FailWithMessage("获取失败", c)
} else {
response.OkWithDetailed(response.PageResult{
List: list,
Total: total,
Page: pageInfo.Page,
PageSize: pageInfo.PageSize,
}, "获取成功", c)
}
}
+116
View File
@@ -0,0 +1,116 @@
package v1
import (
"gin-vue-admin/global"
"gin-vue-admin/model"
"gin-vue-admin/model/request"
"gin-vue-admin/model/response"
"gin-vue-admin/service"
"gin-vue-admin/utils"
"github.com/gin-gonic/gin"
"go.uber.org/zap"
)
// @Tags SysDictionaryDetail
// @Summary 创建SysDictionaryDetail
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.SysDictionaryDetail true "SysDictionaryDetail模型"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /sysDictionaryDetail/createSysDictionaryDetail [post]
func CreateSysDictionaryDetail(c *gin.Context) {
var detail model.SysDictionaryDetail
_ = c.ShouldBindJSON(&detail)
if err := service.CreateSysDictionaryDetail(detail); err != nil {
global.GVA_LOG.Error("创建失败!", zap.Any("err", err))
response.FailWithMessage("创建失败", c)
} else {
response.OkWithMessage("创建成功", c)
}
}
// @Tags SysDictionaryDetail
// @Summary 删除SysDictionaryDetail
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.SysDictionaryDetail true "SysDictionaryDetail模型"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /sysDictionaryDetail/deleteSysDictionaryDetail [delete]
func DeleteSysDictionaryDetail(c *gin.Context) {
var detail model.SysDictionaryDetail
_ = c.ShouldBindJSON(&detail)
if err := service.DeleteSysDictionaryDetail(detail); err != nil {
global.GVA_LOG.Error("删除失败!", zap.Any("err", err))
response.FailWithMessage("删除失败", c)
} else {
response.OkWithMessage("删除成功", c)
}
}
// @Tags SysDictionaryDetail
// @Summary 更新SysDictionaryDetail
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.SysDictionaryDetail true "更新SysDictionaryDetail"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /sysDictionaryDetail/updateSysDictionaryDetail [put]
func UpdateSysDictionaryDetail(c *gin.Context) {
var detail model.SysDictionaryDetail
_ = c.ShouldBindJSON(&detail)
if err := service.UpdateSysDictionaryDetail(&detail); err != nil {
global.GVA_LOG.Error("更新失败!", zap.Any("err", err))
response.FailWithMessage("更新失败", c)
} else {
response.OkWithMessage("更新成功", c)
}
}
// @Tags SysDictionaryDetail
// @Summary 用id查询SysDictionaryDetail
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.SysDictionaryDetail true "用id查询SysDictionaryDetail"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /sysDictionaryDetail/findSysDictionaryDetail [get]
func FindSysDictionaryDetail(c *gin.Context) {
var detail model.SysDictionaryDetail
_ = c.ShouldBindQuery(&detail)
if err := utils.Verify(detail, utils.IdVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
if err, resysDictionaryDetail := service.GetSysDictionaryDetail(detail.ID); err != nil {
global.GVA_LOG.Error("查询失败!", zap.Any("err", err))
response.FailWithMessage("查询失败", c)
} else {
response.OkWithDetailed(gin.H{"resysDictionaryDetail": resysDictionaryDetail}, "查询成功", c)
}
}
// @Tags SysDictionaryDetail
// @Summary 分页获取SysDictionaryDetail列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.SysDictionaryDetailSearch true "页码, 每页大小, 搜索条件"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /sysDictionaryDetail/getSysDictionaryDetailList [get]
func GetSysDictionaryDetailList(c *gin.Context) {
var pageInfo request.SysDictionaryDetailSearch
_ = c.ShouldBindQuery(&pageInfo)
if err, list, total := service.GetSysDictionaryDetailInfoList(pageInfo); err != nil {
global.GVA_LOG.Error("获取失败!", zap.Any("err", err))
response.FailWithMessage("获取失败", c)
} else {
response.OkWithDetailed(response.PageResult{
List: list,
Total: total,
Page: pageInfo.Page,
PageSize: pageInfo.PageSize,
}, "获取成功", c)
}
}
+24
View File
@@ -0,0 +1,24 @@
package v1
import (
"gin-vue-admin/global"
"gin-vue-admin/model/response"
"gin-vue-admin/service"
"github.com/gin-gonic/gin"
"go.uber.org/zap"
)
// @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) {
if err := service.EmailTest(); err != nil {
global.GVA_LOG.Error("发送失败!", zap.Any("err", err))
response.FailWithMessage("发送失败", c)
} else {
response.OkWithData("发送成功", c)
}
}
+8 -9
View File
@@ -1,14 +1,15 @@
package v1
import (
"fmt"
"gin-vue-admin/global/response"
"gin-vue-admin/global"
"gin-vue-admin/model"
"gin-vue-admin/model/response"
"gin-vue-admin/service"
"github.com/gin-gonic/gin"
"go.uber.org/zap"
)
// @Tags jwt
// @Tags Jwt
// @Summary jwt加入黑名单
// @Security ApiKeyAuth
// @accept application/json
@@ -17,12 +18,10 @@ import (
// @Router /jwt/jsonInBlacklist [post]
func JsonInBlacklist(c *gin.Context) {
token := c.Request.Header.Get("x-token")
modelJwt := model.JwtBlacklist{
Jwt: token,
}
err := service.JsonInBlacklist(modelJwt)
if err != nil {
response.FailWithMessage(fmt.Sprintf("jwt作废失败,%v", err), c)
jwt := model.JwtBlacklist{Jwt: token}
if err := service.JsonInBlacklist(jwt); err != nil {
global.GVA_LOG.Error("jwt作废失败!", zap.Any("err", err))
response.FailWithMessage("jwt作废失败", c)
} else {
response.OkWithMessage("jwt作废成功", c)
}
+122 -162
View File
@@ -1,259 +1,219 @@
package v1
import (
"fmt"
"gin-vue-admin/global/response"
"gin-vue-admin/global"
"gin-vue-admin/model"
"gin-vue-admin/model/request"
resp "gin-vue-admin/model/response"
"gin-vue-admin/model/response"
"gin-vue-admin/service"
"gin-vue-admin/utils"
"github.com/gin-gonic/gin"
"go.uber.org/zap"
)
// @Tags authorityAndMenu
// @Tags AuthorityMenu
// @Summary 获取用户动态路由
// @Security ApiKeyAuth
// @Produce application/json
// @Param data body request.RegisterAndLoginStruct true "可以什么都不填"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"返回成功"}"
// @Param data body request.Empty true "空"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /menu/getMenu [post]
func GetMenu(c *gin.Context) {
claims, _ := c.Get("claims")
waitUse := claims.(*request.CustomClaims)
err, menus := service.GetMenuTree(waitUse.AuthorityId)
if err != nil {
response.FailWithMessage(fmt.Sprintf("获取失败,%v", err), c)
if err, menus := service.GetMenuTree(getUserAuthorityId(c)); err != nil {
global.GVA_LOG.Error("获取失败!", zap.Any("err", err))
response.FailWithMessage("获取失败", c)
} else {
response.OkWithData(resp.SysMenusResponse{Menus: menus}, c)
response.OkWithDetailed(response.SysMenusResponse{Menus: menus}, "获取成功", c)
}
}
// @Tags menu
// @Summary 分页获取基础menu列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.PageInfo true "分页获取基础menu列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /menu/getMenuList [post]
func GetMenuList(c *gin.Context) {
var pageInfo request.PageInfo
_ = c.ShouldBindJSON(&pageInfo)
PageVerifyErr := utils.Verify(pageInfo, utils.CustomizeMap["PageVerify"])
if PageVerifyErr != nil {
response.FailWithMessage(PageVerifyErr.Error(), c)
return
}
err, menuList, total := service.GetInfoList()
if err != nil {
response.FailWithMessage(fmt.Sprintf("获取数据失败,%v", err), c)
} else {
response.OkWithData(resp.PageResult{
List: menuList,
Total: total,
Page: pageInfo.Page,
PageSize: pageInfo.PageSize,
}, c)
}
}
// @Tags menu
// @Summary 新增菜单
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.SysBaseMenu true "新增菜单"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /menu/addBaseMenu [post]
func AddBaseMenu(c *gin.Context) {
var menu model.SysBaseMenu
_ = c.ShouldBindJSON(&menu)
MenuVerify := utils.Rules{
"Path": {utils.NotEmpty()},
"ParentId": {utils.NotEmpty()},
"Name": {utils.NotEmpty()},
"Component": {utils.NotEmpty()},
"Sort": {utils.Ge("0"), "ge=0"},
}
MenuVerifyErr := utils.Verify(menu, MenuVerify)
if MenuVerifyErr != nil {
response.FailWithMessage(MenuVerifyErr.Error(), c)
return
}
MetaVerify := utils.Rules{
"Title": {utils.NotEmpty()},
}
MetaVerifyErr := utils.Verify(menu.Meta, MetaVerify)
if MetaVerifyErr != nil {
response.FailWithMessage(MetaVerifyErr.Error(), c)
return
}
err := service.AddBaseMenu(menu)
if err != nil {
response.FailWithMessage(fmt.Sprintf("添加失败,%v", err), c)
} else {
response.OkWithMessage("添加成功", c)
}
}
// @Tags authorityAndMenu
// @Tags AuthorityMenu
// @Summary 获取用户动态路由
// @Security ApiKeyAuth
// @Produce application/json
// @Param data body request.RegisterAndLoginStruct true "可以什么都不填"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"返回成功"}"
// @Param data body request.Empty true "空"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /menu/getBaseMenuTree [post]
func GetBaseMenuTree(c *gin.Context) {
err, menus := service.GetBaseMenuTree()
if err != nil {
response.FailWithMessage(fmt.Sprintf("获取失败,%v", err), c)
if err, menus := service.GetBaseMenuTree(); err != nil {
global.GVA_LOG.Error("获取失败!", zap.Any("err", err))
response.FailWithMessage("获取失败", c)
} else {
response.OkWithData(resp.SysBaseMenusResponse{Menus: menus}, c)
response.OkWithDetailed(response.SysBaseMenusResponse{Menus: menus}, "获取成功", c)
}
}
// @Tags authorityAndMenu
// @Tags AuthorityMenu
// @Summary 增加menu和角色关联关系
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.AddMenuAuthorityInfo true "增加menu和角色关联关系"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Param data body request.AddMenuAuthorityInfo true "角色ID"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"添加成功"}"
// @Router /menu/addMenuAuthority [post]
func AddMenuAuthority(c *gin.Context) {
var addMenuAuthorityInfo request.AddMenuAuthorityInfo
_ = c.ShouldBindJSON(&addMenuAuthorityInfo)
MenuVerify := utils.Rules{
"AuthorityId": {"notEmpty"},
}
MenuVerifyErr := utils.Verify(addMenuAuthorityInfo, MenuVerify)
if MenuVerifyErr != nil {
response.FailWithMessage(MenuVerifyErr.Error(), c)
var authorityMenu request.AddMenuAuthorityInfo
_ = c.ShouldBindJSON(&authorityMenu)
if err := utils.Verify(authorityMenu, utils.AuthorityIdVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
err := service.AddMenuAuthority(addMenuAuthorityInfo.Menus, addMenuAuthorityInfo.AuthorityId)
if err != nil {
response.FailWithMessage(fmt.Sprintf("添加失败,%v", err), c)
if err := service.AddMenuAuthority(authorityMenu.Menus, authorityMenu.AuthorityId); err != nil {
global.GVA_LOG.Error("添加失败!", zap.Any("err", err))
response.FailWithMessage("添加失败", c)
} else {
response.OkWithMessage("添加成功", c)
}
}
// @Tags authorityAndMenu
// @Tags AuthorityMenu
// @Summary 获取指定角色menu
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.AuthorityIdInfo true "增加menu和角色关联关系"
// @Param data body request.GetAuthorityId true "角色ID"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /menu/GetMenuAuthority [post]
func GetMenuAuthority(c *gin.Context) {
var authorityIdInfo request.AuthorityIdInfo
_ = c.ShouldBindJSON(&authorityIdInfo)
MenuVerify := utils.Rules{
"AuthorityId": {"notEmpty"},
}
MenuVerifyErr := utils.Verify(authorityIdInfo, MenuVerify)
if MenuVerifyErr != nil {
response.FailWithMessage(MenuVerifyErr.Error(), c)
var param request.GetAuthorityId
_ = c.ShouldBindJSON(&param)
if err := utils.Verify(param, utils.AuthorityIdVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
err, menus := service.GetMenuAuthority(authorityIdInfo.AuthorityId)
if err != nil {
response.FailWithDetailed(response.ERROR, resp.SysMenusResponse{Menus: menus}, fmt.Sprintf("添加失败,%v", err), c)
if err, menus := service.GetMenuAuthority(&param); err != nil {
global.GVA_LOG.Error("获取失败!", zap.Any("err", err))
response.FailWithDetailed(response.SysMenusResponse{Menus: menus}, "获取失败", c)
} else {
response.Result(response.SUCCESS, gin.H{"menus": menus}, "获取成功", c)
response.OkWithDetailed(gin.H{"menus": menus}, "获取成功", c)
}
}
// @Tags menu
// @Tags Menu
// @Summary 新增菜单
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.SysBaseMenu true "路由path, 父菜单ID, 路由name, 对应前端文件路径, 排序标记"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"添加成功"}"
// @Router /menu/addBaseMenu [post]
func AddBaseMenu(c *gin.Context) {
var menu model.SysBaseMenu
_ = c.ShouldBindJSON(&menu)
if err := utils.Verify(menu, utils.MenuVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
if err := utils.Verify(menu.Meta, utils.MenuMetaVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
if err := service.AddBaseMenu(menu); err != nil {
global.GVA_LOG.Error("添加失败!", zap.Any("err", err))
response.FailWithMessage("添加失败", c)
} else {
response.OkWithMessage("添加成功", c)
}
}
// @Tags Menu
// @Summary 删除菜单
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.GetById true "删除菜单"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Param data body request.GetById true "菜单id"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /menu/deleteBaseMenu [post]
func DeleteBaseMenu(c *gin.Context) {
var idInfo request.GetById
_ = c.ShouldBindJSON(&idInfo)
IdVerifyErr := utils.Verify(idInfo, utils.CustomizeMap["IdVerify"])
if IdVerifyErr != nil {
response.FailWithMessage(IdVerifyErr.Error(), c)
var menu request.GetById
_ = c.ShouldBindJSON(&menu)
if err := utils.Verify(menu, utils.IdVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
err := service.DeleteBaseMenu(idInfo.Id)
if err != nil {
response.FailWithMessage(fmt.Sprintf("删除失败:%v", err), c)
if err := service.DeleteBaseMenu(menu.Id); err != nil {
global.GVA_LOG.Error("删除失败!", zap.Any("err", err))
response.FailWithMessage("删除失败", c)
} else {
response.OkWithMessage("删除成功", c)
}
}
// @Tags menu
// @Tags Menu
// @Summary 更新菜单
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.SysBaseMenu true "更新菜单"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Param data body model.SysBaseMenu true "路由path, 父菜单ID, 路由name, 对应前端文件路径, 排序标记"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /menu/updateBaseMenu [post]
func UpdateBaseMenu(c *gin.Context) {
var menu model.SysBaseMenu
_ = c.ShouldBindJSON(&menu)
MenuVerify := utils.Rules{
"Path": {"notEmpty"},
"ParentId": {utils.NotEmpty()},
"Name": {utils.NotEmpty()},
"Component": {utils.NotEmpty()},
"Sort": {utils.Ge("0"), "ge=0"},
}
MenuVerifyErr := utils.Verify(menu, MenuVerify)
if MenuVerifyErr != nil {
response.FailWithMessage(MenuVerifyErr.Error(), c)
if err := utils.Verify(menu, utils.MenuVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
MetaVerify := utils.Rules{
"Title": {utils.NotEmpty()},
}
MetaVerifyErr := utils.Verify(menu.Meta, MetaVerify)
if MetaVerifyErr != nil {
response.FailWithMessage(MetaVerifyErr.Error(), c)
if err := utils.Verify(menu.Meta, utils.MenuMetaVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
err := service.UpdateBaseMenu(menu)
if err != nil {
response.FailWithMessage(fmt.Sprintf("修改失败:%v", err), c)
if err := service.UpdateBaseMenu(menu); err != nil {
global.GVA_LOG.Error("更新失败!", zap.Any("err", err))
response.FailWithMessage("更新失败", c)
} else {
response.OkWithMessage("修改成功", c)
response.OkWithMessage("更新成功", c)
}
}
// @Tags menu
// @Tags Menu
// @Summary 根据id获取菜单
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.GetById true "根据id获取菜单"
// @Param data body request.GetById true "菜单id"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /menu/getBaseMenuById [post]
func GetBaseMenuById(c *gin.Context) {
var idInfo request.GetById
_ = c.ShouldBindJSON(&idInfo)
MenuVerify := utils.Rules{
"Id": {"notEmpty"},
}
MenuVerifyErr := utils.Verify(idInfo, MenuVerify)
if MenuVerifyErr != nil {
response.FailWithMessage(MenuVerifyErr.Error(), c)
if err := utils.Verify(idInfo, utils.IdVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
err, menu := service.GetBaseMenuById(idInfo.Id)
if err != nil {
response.FailWithMessage(fmt.Sprintf("查询失败:%v", err), c)
if err, menu := service.GetBaseMenuById(idInfo.Id); err != nil {
global.GVA_LOG.Error("获取失败!", zap.Any("err", err))
response.FailWithMessage("获取失败", c)
} else {
response.OkWithData(resp.SysBaseMenuResponse{Menu: menu}, c)
response.OkWithDetailed(response.SysBaseMenuResponse{Menu: menu}, "获取成功", c)
}
}
// @Tags Menu
// @Summary 分页获取基础menu列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.PageInfo true "页码, 每页大小"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /menu/getMenuList [post]
func GetMenuList(c *gin.Context) {
var pageInfo request.PageInfo
_ = c.ShouldBindJSON(&pageInfo)
if err := utils.Verify(pageInfo, utils.PageInfoVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
if err, menuList, total := service.GetInfoList(); err != nil {
global.GVA_LOG.Error("获取失败!", zap.Any("err", err))
response.FailWithMessage("获取失败", c)
} else {
response.OkWithDetailed(response.PageResult{
List: menuList,
Total: total,
Page: pageInfo.Page,
PageSize: pageInfo.PageSize,
},"获取成功", c)
}
}
+116
View File
@@ -0,0 +1,116 @@
package v1
import (
"gin-vue-admin/global"
"gin-vue-admin/model"
"gin-vue-admin/model/request"
"gin-vue-admin/model/response"
"gin-vue-admin/service"
"gin-vue-admin/utils"
"github.com/gin-gonic/gin"
"go.uber.org/zap"
)
// @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/createSysOperationRecord [post]
func CreateSysOperationRecord(c *gin.Context) {
var sysOperationRecord model.SysOperationRecord
_ = c.ShouldBindJSON(&sysOperationRecord)
if err := service.CreateSysOperationRecord(sysOperationRecord); err != nil {
global.GVA_LOG.Error("创建失败!", zap.Any("err", err))
response.FailWithMessage("创建失败", c)
} else {
response.OkWithMessage("创建成功", c)
}
}
// @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/deleteSysOperationRecord [delete]
func DeleteSysOperationRecord(c *gin.Context) {
var sysOperationRecord model.SysOperationRecord
_ = c.ShouldBindJSON(&sysOperationRecord)
if err := service.DeleteSysOperationRecord(sysOperationRecord); err != nil {
global.GVA_LOG.Error("删除失败!", zap.Any("err", err))
response.FailWithMessage("删除失败", c)
} else {
response.OkWithMessage("删除成功", c)
}
}
// @Tags SysOperationRecord
// @Summary 批量删除SysOperationRecord
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除SysOperationRecord"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"批量删除成功"}"
// @Router /sysOperationRecord/deleteSysOperationRecordByIds [delete]
func DeleteSysOperationRecordByIds(c *gin.Context) {
var IDS request.IdsReq
_ = c.ShouldBindJSON(&IDS)
if err := service.DeleteSysOperationRecordByIds(IDS); err != nil {
global.GVA_LOG.Error("批量删除失败!", zap.Any("err", err))
response.FailWithMessage("批量删除失败", c)
} else {
response.OkWithMessage("批量删除成功", c)
}
}
// @Tags SysOperationRecord
// @Summary 用id查询SysOperationRecord
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.SysOperationRecord true "Id"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /sysOperationRecord/findSysOperationRecord [get]
func FindSysOperationRecord(c *gin.Context) {
var sysOperationRecord model.SysOperationRecord
_ = c.ShouldBindQuery(&sysOperationRecord)
if err := utils.Verify(sysOperationRecord, utils.IdVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
if err, resysOperationRecord := service.GetSysOperationRecord(sysOperationRecord.ID); err != nil {
global.GVA_LOG.Error("查询失败!", zap.Any("err", err))
response.FailWithMessage("查询失败", c)
} else {
response.OkWithDetailed(gin.H{"resysOperationRecord": resysOperationRecord}, "查询成功", c)
}
}
// @Tags SysOperationRecord
// @Summary 分页获取SysOperationRecord列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.SysOperationRecordSearch true "页码, 每页大小, 搜索条件"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /sysOperationRecord/getSysOperationRecordList [get]
func GetSysOperationRecordList(c *gin.Context) {
var pageInfo request.SysOperationRecordSearch
_ = c.ShouldBindQuery(&pageInfo)
if err, list, total := service.GetSysOperationRecordInfoList(pageInfo); err != nil {
global.GVA_LOG.Error("获取失败!", zap.Any("err", err))
response.FailWithMessage("获取失败", c)
} else {
response.OkWithDetailed(response.PageResult{
List: list,
Total: total,
Page: pageInfo.Page,
PageSize: pageInfo.PageSize,
}, "获取成功", c)
}
}
+39 -22
View File
@@ -1,62 +1,79 @@
package v1
import (
"fmt"
"gin-vue-admin/global/response"
"gin-vue-admin/global"
"gin-vue-admin/model"
resp "gin-vue-admin/model/response"
"gin-vue-admin/model/response"
"gin-vue-admin/service"
"github.com/gin-gonic/gin"
"go.uber.org/zap"
)
// @Tags system
// @Tags System
// @Summary 获取配置文件内容
// @Security ApiKeyAuth
// @Produce application/json
// @Success 200 {string} string "{"success":true,"data":{},"msg":"返回成功"}"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /system/getSystemConfig [post]
func GetSystemConfig(c *gin.Context) {
err, config := service.GetSystemConfig()
if err != nil {
response.FailWithMessage(fmt.Sprintf("获取失败,%v", err), c)
if err, config := service.GetSystemConfig(); err != nil {
global.GVA_LOG.Error("获取失败!", zap.Any("err", err))
response.FailWithMessage("获取失败", c)
} else {
response.OkWithData(resp.SysConfigResponse{Config: config}, c)
response.OkWithDetailed(response.SysConfigResponse{Config: config}, "获取成功", c)
}
}
// @Tags system
// @Tags System
// @Summary 设置配置文件内容
// @Security ApiKeyAuth
// @Produce application/json
// @Param data body model.System true "设置配置文件内容"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"返回成功"}"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"设置成功"}"
// @Router /system/setSystemConfig [post]
func SetSystemConfig(c *gin.Context) {
var sys model.System
_ = c.ShouldBindJSON(&sys)
err := service.SetSystemConfig(sys)
if err != nil {
response.FailWithMessage(fmt.Sprintf("设置失败,%v", err), c)
if err := service.SetSystemConfig(sys); err != nil {
global.GVA_LOG.Error("设置失败!", zap.Any("err", err))
response.FailWithMessage("设置失败", c)
} else {
response.OkWithData("设置成功", c)
}
}
// 本方法开发中 开发者windows系统 缺少linux系统所需的包 因此搁置
// @Tags system
// @Summary 设置配置文件内容
// @Tags System
// @Summary 重启系统
// @Security ApiKeyAuth
// @Produce application/json
// @Param data body model.System true "设置配置文件内容"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"返回成功"}"
// @Param data body model.System true "重启系统"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"重启系统成功"}"
// @Router /system/ReloadSystem [post]
func ReloadSystem(c *gin.Context) {
var sys model.System
_ = c.ShouldBindJSON(&sys)
err := service.SetSystemConfig(sys)
if err != nil {
response.FailWithMessage(fmt.Sprintf("设置失败,%v", err), c)
if err := service.SetSystemConfig(sys); err != nil {
global.GVA_LOG.Error("重启系统失败!", zap.Any("err", err))
response.FailWithMessage("重启系统失败", c)
} else {
response.OkWithMessage("设置成功", c)
response.OkWithMessage("重启系统成功", c)
}
}
// @Tags System
// @Summary 获取服务器信息
// @Security ApiKeyAuth
// @Produce application/json
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /system/getServerInfo [post]
func GetServerInfo(c *gin.Context) {
if server, err := service.GetServerInfo(); err != nil {
global.GVA_LOG.Error("获取失败!", zap.Any("err", err))
response.FailWithMessage("获取失败", c)
return
} else {
response.OkWithDetailed(gin.H{"server": server}, "获取成功", c)
}
}
+144 -151
View File
@@ -1,129 +1,90 @@
package v1
import (
"fmt"
"gin-vue-admin/global"
"gin-vue-admin/global/response"
"gin-vue-admin/middleware"
"gin-vue-admin/model"
"gin-vue-admin/model/request"
resp "gin-vue-admin/model/response"
"gin-vue-admin/model/response"
"gin-vue-admin/service"
"gin-vue-admin/utils"
"github.com/dchest/captcha"
"github.com/dgrijalva/jwt-go"
"github.com/gin-gonic/gin"
"github.com/go-redis/redis"
"mime/multipart"
"go.uber.org/zap"
"time"
)
// @Tags Base
// @Summary 用户注册账号
// @Produce application/json
// @Param data body model.SysUser true "用户注册接口"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"注册成功"}"
// @Router /base/register [post]
func Register(c *gin.Context) {
var R request.RegisterStruct
_ = c.ShouldBindJSON(&R)
UserVerify := utils.Rules{
"Username": {utils.NotEmpty()},
"NickName": {utils.NotEmpty()},
"Password": {utils.NotEmpty()},
"AuthorityId": {utils.NotEmpty()},
}
UserVerifyErr := utils.Verify(R, UserVerify)
if UserVerifyErr != nil {
response.FailWithMessage(UserVerifyErr.Error(), c)
return
}
user := &model.SysUser{Username: R.Username, NickName: R.NickName, Password: R.Password, HeaderImg: R.HeaderImg, AuthorityId: R.AuthorityId}
err, userReturn := service.Register(*user)
if err != nil {
response.FailWithDetailed(response.ERROR, resp.SysUserResponse{User: userReturn}, fmt.Sprintf("%v", err), c)
} else {
response.OkDetailed(resp.SysUserResponse{User: userReturn}, "注册成功", c)
}
}
// @Tags Base
// @Summary 用户登录
// @Produce application/json
// @Param data body request.RegisterAndLoginStruct true "用户登录接口"
// @Param data body request.Login true "用户名, 密码, 验证码"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"登陆成功"}"
// @Router /base/login [post]
func Login(c *gin.Context) {
var L request.RegisterAndLoginStruct
var L request.Login
_ = c.ShouldBindJSON(&L)
UserVerify := utils.Rules{
"CaptchaId": {utils.NotEmpty()},
"Captcha": {utils.NotEmpty()},
"Username": {utils.NotEmpty()},
"Password": {utils.NotEmpty()},
}
UserVerifyErr := utils.Verify(L, UserVerify)
if UserVerifyErr != nil {
response.FailWithMessage(UserVerifyErr.Error(), c)
if err := utils.Verify(L, utils.LoginVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
if captcha.VerifyString(L.CaptchaId, L.Captcha) {
if store.Verify(L.CaptchaId, L.Captcha, true) {
U := &model.SysUser{Username: L.Username, Password: L.Password}
if err, user := service.Login(U); err != nil {
response.FailWithMessage(fmt.Sprintf("用户名密码错误或%v", err), c)
global.GVA_LOG.Error("登陆失败! 用户名不存在或者密码错误", zap.Any("err", err))
response.FailWithMessage("用户名不存在或者密码错误", c)
} else {
tokenNext(c, *user)
}
} else {
response.FailWithMessage("验证码错误", c)
}
}
// 登录以后签发jwt
func tokenNext(c *gin.Context, user model.SysUser) {
j := &middleware.JWT{
SigningKey: []byte(global.GVA_CONFIG.JWT.SigningKey), // 唯一签名
}
clams := request.CustomClaims{
j := &middleware.JWT{SigningKey: []byte(global.GVA_CONFIG.JWT.SigningKey)} // 唯一签名
claims := request.CustomClaims{
UUID: user.UUID,
ID: user.ID,
NickName: user.NickName,
Username: user.Username,
AuthorityId: user.AuthorityId,
BufferTime: 60 * 60 * 24, // 缓冲时间1天 缓冲时间内会获得新的token刷新令牌 此时一个用户会存在两个有效令牌 但是前端只留一个 另一个会丢失
StandardClaims: jwt.StandardClaims{
NotBefore: time.Now().Unix() - 1000, // 签名生效时间
ExpiresAt: time.Now().Unix() + 60*60*24*7, // 过期时间 一周
ExpiresAt: time.Now().Unix() + 60*60*24*7, // 过期时间 7天
Issuer: "qmPlus", // 签名的发行者
},
}
token, err := j.CreateToken(clams)
token, err := j.CreateToken(claims)
if err != nil {
global.GVA_LOG.Error("获取token失败", zap.Any("err", err))
response.FailWithMessage("获取token失败", c)
return
}
if !global.GVA_CONFIG.System.UseMultipoint {
response.OkWithData(resp.LoginResponse{
response.OkWithDetailed(response.LoginResponse{
User: user,
Token: token,
ExpiresAt: clams.StandardClaims.ExpiresAt * 1000,
}, c)
ExpiresAt: claims.StandardClaims.ExpiresAt * 1000,
}, "登录成功", c)
return
}
var loginJwt model.JwtBlacklist
loginJwt.Jwt = token
err, jwtStr := service.GetRedisJWT(user.Username)
if err == redis.Nil {
if err := service.SetRedisJWT(loginJwt, user.Username); err != nil {
if err, jwtStr := service.GetRedisJWT(user.Username); err == redis.Nil {
if err := service.SetRedisJWT(token, user.Username); err != nil {
global.GVA_LOG.Error("设置登录状态失败", zap.Any("err", err))
response.FailWithMessage("设置登录状态失败", c)
return
}
response.OkWithData(resp.LoginResponse{
response.OkWithDetailed(response.LoginResponse{
User: user,
Token: token,
ExpiresAt: clams.StandardClaims.ExpiresAt * 1000,
}, c)
ExpiresAt: claims.StandardClaims.ExpiresAt * 1000,
}, "登录成功", c)
} else if err != nil {
response.FailWithMessage(fmt.Sprintf("%v", err), c)
global.GVA_LOG.Error("设置登录状态失败", zap.Any("err", err))
response.FailWithMessage("设置登录状态失败", c)
} else {
var blackJWT model.JwtBlacklist
blackJWT.Jwt = jwtStr
@@ -131,15 +92,38 @@ func tokenNext(c *gin.Context, user model.SysUser) {
response.FailWithMessage("jwt作废失败", c)
return
}
if err := service.SetRedisJWT(loginJwt, user.Username); err != nil {
if err := service.SetRedisJWT(token, user.Username); err != nil {
response.FailWithMessage("设置登录状态失败", c)
return
}
response.OkWithData(resp.LoginResponse{
response.OkWithDetailed(response.LoginResponse{
User: user,
Token: token,
ExpiresAt: clams.StandardClaims.ExpiresAt * 1000,
}, c)
ExpiresAt: claims.StandardClaims.ExpiresAt * 1000,
}, "登录成功", c)
}
}
// @Tags SysUser
// @Summary 用户注册账号
// @Produce application/json
// @Param data body model.SysUser true "用户名, 昵称, 密码, 角色ID"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"注册成功"}"
// @Router /user/register [post]
func Register(c *gin.Context) {
var R request.Register
_ = c.ShouldBindJSON(&R)
if err := utils.Verify(R, utils.RegisterVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
user := &model.SysUser{Username: R.Username, NickName: R.NickName, Password: R.Password, HeaderImg: R.HeaderImg, AuthorityId: R.AuthorityId}
err, userReturn := service.Register(*user)
if err != nil {
global.GVA_LOG.Error("注册失败", zap.Any("err", err))
response.FailWithDetailed(response.SysUserResponse{User: userReturn}, "注册失败", c)
} else {
response.OkWithDetailed(response.SysUserResponse{User: userReturn}, "注册成功", c)
}
}
@@ -147,96 +131,50 @@ func tokenNext(c *gin.Context, user model.SysUser) {
// @Summary 用户修改密码
// @Security ApiKeyAuth
// @Produce application/json
// @Param data body request.ChangePasswordStruct true "用户修改密码"
// @Param data body request.ChangePasswordStruct true "用户名, 原密码, 新密码"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"修改成功"}"
// @Router /user/changePassword [put]
func ChangePassword(c *gin.Context) {
var params request.ChangePasswordStruct
_ = c.ShouldBindJSON(&params)
UserVerify := utils.Rules{
"Username": {utils.NotEmpty()},
"Password": {utils.NotEmpty()},
"NewPassword": {utils.NotEmpty()},
}
UserVerifyErr := utils.Verify(params, UserVerify)
if UserVerifyErr != nil {
response.FailWithMessage(UserVerifyErr.Error(), c)
var user request.ChangePasswordStruct
_ = c.ShouldBindJSON(&user)
if err := utils.Verify(user, utils.ChangePasswordVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
U := &model.SysUser{Username: params.Username, Password: params.Password}
if err, _ := service.ChangePassword(U, params.NewPassword); err != nil {
response.FailWithMessage("修改失败,请检查用户名密码", c)
U := &model.SysUser{Username: user.Username, Password: user.Password}
if err, _ := service.ChangePassword(U, user.NewPassword); err != nil {
global.GVA_LOG.Error("修改失败", zap.Any("err", err))
response.FailWithMessage("修改失败,原密码与当前账户不符", c)
} else {
response.OkWithMessage("修改成功", c)
}
}
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
// @accept application/json
// @Produce application/json
// @Param data body request.PageInfo true "分页获取用户列表"
// @Param data body request.PageInfo true "页码, 每页大小"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /user/getUserList [post]
func GetUserList(c *gin.Context) {
var pageInfo request.PageInfo
_ = c.ShouldBindJSON(&pageInfo)
PageVerifyErr := utils.Verify(pageInfo, utils.CustomizeMap["PageVerify"])
if PageVerifyErr != nil {
response.FailWithMessage(PageVerifyErr.Error(), c)
if err := utils.Verify(pageInfo, utils.PageInfoVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
err, list, total := service.GetUserInfoList(pageInfo)
if err != nil {
response.FailWithMessage(fmt.Sprintf("获取数据失败,%v", err), c)
if err, list, total := service.GetUserInfoList(pageInfo); err != nil {
global.GVA_LOG.Error("获取失败", zap.Any("err", err))
response.FailWithMessage("获取失败", c)
} else {
response.OkWithData(resp.PageResult{
response.OkWithDetailed(response.PageResult{
List: list,
Total: total,
Page: pageInfo.Page,
PageSize: pageInfo.PageSize,
}, c)
}, "获取成功", c)
}
}
@@ -245,24 +183,19 @@ func GetUserList(c *gin.Context) {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.SetUserAuth true "设置用户权限"
// @Param data body request.SetUserAuth true "用户UUID, 角色ID"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"修改成功"}"
// @Router /user/setUserAuthority [post]
func SetUserAuthority(c *gin.Context) {
var sua request.SetUserAuth
_ = c.ShouldBindJSON(&sua)
UserVerify := utils.Rules{
"UUID": {utils.NotEmpty()},
"AuthorityId": {utils.NotEmpty()},
}
UserVerifyErr := utils.Verify(sua, UserVerify)
if UserVerifyErr != nil {
if UserVerifyErr := utils.Verify(sua, utils.SetUserAuthorityVerify); UserVerifyErr != nil {
response.FailWithMessage(UserVerifyErr.Error(), c)
return
}
err := service.SetUserAuthority(sua.UUID, sua.AuthorityId)
if err != nil {
response.FailWithMessage(fmt.Sprintf("修改失败,%v", err), c)
if err := service.SetUserAuthority(sua.UUID, sua.AuthorityId); err != nil {
global.GVA_LOG.Error("修改失败", zap.Any("err", err))
response.FailWithMessage("修改失败", c)
} else {
response.OkWithMessage("修改成功", c)
}
@@ -273,21 +206,81 @@ func SetUserAuthority(c *gin.Context) {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.GetById true "删除用户"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"修改成功"}"
// @Param data body request.GetById true "用户ID"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /user/deleteUser [delete]
func DeleteUser(c *gin.Context) {
var reqId request.GetById
_ = c.ShouldBindJSON(&reqId)
IdVerifyErr := utils.Verify(reqId, utils.CustomizeMap["IdVerify"])
if IdVerifyErr != nil {
response.FailWithMessage(IdVerifyErr.Error(), c)
if err := utils.Verify(reqId, utils.IdVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
err := service.DeleteUser(reqId.Id)
if err != nil {
response.FailWithMessage(fmt.Sprintf("删除失败,%v", err), c)
jwtId := getUserID(c)
if jwtId == uint(reqId.Id) {
response.FailWithMessage("删除失败, 自杀失败", c)
return
}
if err := service.DeleteUser(reqId.Id); err != nil {
global.GVA_LOG.Error("删除失败!", zap.Any("err", err))
response.FailWithMessage("删除失败", c)
} else {
response.OkWithMessage("删除成功", c)
}
}
// @Tags SysUser
// @Summary 设置用户信息
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.SysUser true "ID, 用户名, 昵称, 头像链接"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"设置成功"}"
// @Router /user/setUserInfo [put]
func SetUserInfo(c *gin.Context) {
var user model.SysUser
_ = c.ShouldBindJSON(&user)
if err := utils.Verify(user, utils.SetUserVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
if err, ReqUser := service.SetUserInfo(user); err != nil {
global.GVA_LOG.Error("设置失败", zap.Any("err", err))
response.FailWithMessage("设置失败", c)
} else {
response.OkWithDetailed(gin.H{"userInfo": ReqUser}, "设置成功", c)
}
}
// 从Gin的Context中获取从jwt解析出来的用户ID
func getUserID(c *gin.Context) uint {
if claims, exists := c.Get("claims"); !exists {
global.GVA_LOG.Error("从Gin的Context中获取从jwt解析出来的用户ID失败, 请检查路由是否使用jwt中间件")
return 0
} else {
waitUse := claims.(*request.CustomClaims)
return waitUse.ID
}
}
// 从Gin的Context中获取从jwt解析出来的用户UUID
func getUserUuid(c *gin.Context) string {
if claims, exists := c.Get("claims"); !exists {
global.GVA_LOG.Error("从Gin的Context中获取从jwt解析出来的用户UUID失败, 请检查路由是否使用jwt中间件")
return ""
} else {
waitUse := claims.(*request.CustomClaims)
return waitUse.UUID.String()
}
}
// 从Gin的Context中获取从jwt解析出来的用户角色id
func getUserAuthorityId(c *gin.Context) string {
if claims, exists := c.Get("claims"); !exists {
global.GVA_LOG.Error("从Gin的Context中获取从jwt解析出来的用户UUID失败, 请检查路由是否使用jwt中间件")
return ""
} else {
waitUse := claims.(*request.CustomClaims)
return waitUse.AuthorityId
}
}
-38
View File
@@ -1,38 +0,0 @@
package v1
import (
"fmt"
"gin-vue-admin/global/response"
"gin-vue-admin/model"
"gin-vue-admin/service"
"gin-vue-admin/utils"
"github.com/gin-gonic/gin"
)
// @Tags workflow
// @Summary 注册工作流
// @Produce application/json
// @Param data body model.SysWorkflow true "注册工作流接口"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"注册成功"}"
// @Router /workflow/createWorkFlow [post]
func CreateWorkFlow(c *gin.Context) {
var wk model.SysWorkflow
_ = c.ShouldBindJSON(&wk)
WKVerify := utils.Rules{
"WorkflowNickName": {utils.NotEmpty()},
"WorkflowName": {utils.NotEmpty()},
"WorkflowDescription": {utils.NotEmpty()},
"WorkflowStepInfo": {utils.NotEmpty()},
}
WKVerifyErr := utils.Verify(wk, WKVerify)
if WKVerifyErr != nil {
response.FailWithMessage(WKVerifyErr.Error(), c)
return
}
err := service.Create(wk)
if err != nil {
response.FailWithMessage(fmt.Sprintf("获取失败:%v", err), c)
} else {
response.OkWithMessage("获取成功", c)
}
}
+258
View File
@@ -0,0 +1,258 @@
package v1
import (
"fmt"
"gin-vue-admin/global"
"gin-vue-admin/model"
"gin-vue-admin/model/request"
"gin-vue-admin/model/response"
"gin-vue-admin/service"
"github.com/gin-gonic/gin"
)
// @Tags WorkflowProcess
// @Summary 创建WorkflowProcess
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.WorkflowProcess true "创建WorkflowProcess"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /workflowProcess/createWorkflowProcess [post]
func CreateWorkflowProcess(c *gin.Context) {
var workflowProcess model.WorkflowProcess
_ = c.ShouldBindJSON(&workflowProcess)
err := service.CreateWorkflowProcess(workflowProcess)
if err != nil {
response.FailWithMessage(fmt.Sprintf("创建失败,%v", err), c)
} else {
response.OkWithMessage("创建成功", c)
}
}
// @Tags WorkflowProcess
// @Summary 删除WorkflowProcess
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.WorkflowProcess true "删除WorkflowProcess"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /workflowProcess/deleteWorkflowProcess [delete]
func DeleteWorkflowProcess(c *gin.Context) {
var workflowProcess model.WorkflowProcess
_ = c.ShouldBindJSON(&workflowProcess)
err := service.DeleteWorkflowProcess(workflowProcess)
if err != nil {
response.FailWithMessage(fmt.Sprintf("删除失败,%v", err), c)
} else {
response.OkWithMessage("删除成功", c)
}
}
// @Tags WorkflowProcess
// @Summary 批量删除WorkflowProcess
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除WorkflowProcess"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /workflowProcess/deleteWorkflowProcessByIds [delete]
func DeleteWorkflowProcessByIds(c *gin.Context) {
var IDS request.IdsReq
_ = c.ShouldBindJSON(&IDS)
err := service.DeleteWorkflowProcessByIds(IDS)
if err != nil {
response.FailWithMessage(fmt.Sprintf("删除失败,%v", err), c)
} else {
response.OkWithMessage("删除成功", c)
}
}
// @Tags WorkflowProcess
// @Summary 更新WorkflowProcess
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.WorkflowProcess true "更新WorkflowProcess"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /workflowProcess/updateWorkflowProcess [put]
func UpdateWorkflowProcess(c *gin.Context) {
var workflowProcess model.WorkflowProcess
_ = c.ShouldBindJSON(&workflowProcess)
err := service.UpdateWorkflowProcess(&workflowProcess)
if err != nil {
response.FailWithMessage(fmt.Sprintf("更新失败,%v", err), c)
} else {
response.OkWithMessage("更新成功", c)
}
}
// @Tags WorkflowProcess
// @Summary 用id查询WorkflowProcess
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.WorkflowProcess true "用id查询WorkflowProcess"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /workflowProcess/findWorkflowProcess [get]
func FindWorkflowProcess(c *gin.Context) {
var workflowProcess model.WorkflowProcess
_ = c.ShouldBindQuery(&workflowProcess)
err, reworkflowProcess := service.GetWorkflowProcess(workflowProcess.ID)
if err != nil {
response.FailWithMessage(fmt.Sprintf("查询失败,%v", err), c)
} else {
response.OkWithData(gin.H{"reworkflowProcess": reworkflowProcess}, c)
}
}
// @Tags WorkflowProcess
// @Summary 用id查询工作流步骤
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.WorkflowProcess true "用id查询WorkflowProcess"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /workflowProcess/findWorkflowStep [get]
func FindWorkflowStep(c *gin.Context) {
var workflowProcess model.WorkflowProcess
_ = c.ShouldBindQuery(&workflowProcess)
err, workflow := service.FindWorkflowStep(workflowProcess.ID)
if err != nil {
response.FailWithMessage(fmt.Sprintf("查询失败,%v", err), c)
} else {
response.OkWithData(gin.H{"workflow": workflow}, c)
}
}
// @Tags WorkflowProcess
// @Summary 分页获取WorkflowProcess列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.WorkflowProcessSearch true "分页获取WorkflowProcess列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /workflowProcess/getWorkflowProcessList [get]
func GetWorkflowProcessList(c *gin.Context) {
var pageInfo request.WorkflowProcessSearch
_ = c.ShouldBindQuery(&pageInfo)
err, list, total := service.GetWorkflowProcessInfoList(pageInfo)
if err != nil {
response.FailWithMessage(fmt.Sprintf("获取数据失败,%v", err), c)
} else {
response.OkWithData(response.PageResult{
List: list,
Total: total,
Page: pageInfo.Page,
PageSize: pageInfo.PageSize,
}, c)
}
}
// @Tags WorkflowProcess
// @Summary 开启工作流
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /workflowProcess/startWorkflow [post]
func StartWorkflow(c *gin.Context) {
business := c.Query("businessType")
wfInfo := model.WorkflowBusinessStruct[business]()
c.ShouldBindJSON(wfInfo)
err := service.StartWorkflow(wfInfo)
if err != nil {
response.FailWithMessage(err.Error(), c)
return
}
response.OkWithMessage("启动成功", c)
}
// @Tags WorkflowProcess
// @Summary 提交工作流
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /workflowProcess/completeWorkflowMove [post]
func CompleteWorkflowMove(c *gin.Context) {
business := c.Query("businessType")
wfInfo := model.WorkflowBusinessStruct[business]()
c.ShouldBindJSON(wfInfo)
err := service.CompleteWorkflowMove(wfInfo)
if err != nil {
response.FailWithMessage(err.Error(), c)
return
}
response.OkWithMessage("启动成功", c)
}
// @Tags WorkflowProcess
// @Summary 我发起的工作流
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /workflowProcess/getMyStated [get]
func GetMyStated(c *gin.Context) {
if claims, exists := c.Get("claims"); !exists {
errStr := "从Gin的Context中获取从jwt解析出来的用户ID失败, 请检查路由是否使用jwt中间件"
global.GVA_LOG.Error(errStr)
response.FailWithMessage(errStr, c)
} else {
waitUse := claims.(*request.CustomClaims)
err, wfms := service.GetMyStated(waitUse.ID)
if err != nil {
errStr := err.Error()
global.GVA_LOG.Error(errStr)
response.FailWithMessage(errStr, c)
return
}
response.OkWithData(gin.H{"wfms": wfms}, c)
}
}
// @Tags WorkflowProcess
// @Summary 我的待办
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /workflowProcess/getMyNeed [get]
func GetMyNeed(c *gin.Context) {
if claims, exists := c.Get("claims"); !exists {
errStr := "从Gin的Context中获取从jwt解析出来的用户ID失败, 请检查路由是否使用jwt中间件"
global.GVA_LOG.Error(errStr)
response.FailWithMessage(errStr, c)
} else {
waitUse := claims.(*request.CustomClaims)
err, wfms := service.GetMyNeed(waitUse.ID, waitUse.AuthorityId)
if err != nil {
errStr := err.Error()
global.GVA_LOG.Error(errStr)
response.FailWithMessage(errStr, c)
return
}
response.OkWithData(gin.H{"wfms": wfms}, c)
}
}
// @Tags WorkflowProcess
// @Summary 根据id获取当前节点详情和历史
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.GetById true "根据id获取当前节点详情和过往"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /workflowProcess/getWorkflowMoveByID [get]
func GetWorkflowMoveByID(c *gin.Context) {
var req request.GetById
_ = c.ShouldBindQuery(&req)
err, move, moves, business := service.GetWorkflowMoveByID(req.Id)
if err != nil {
errStr := err.Error()
global.GVA_LOG.Error(errStr)
response.FailWithMessage(errStr, c)
return
}
response.OkWithData(gin.H{"move": move, "moves": moves, "business": business}, c)
}
+14
View File
@@ -0,0 +1,14 @@
package datas
import (
"github.com/gookit/color"
"gorm.io/gorm"
)
func InitAuthorityMenu(db *gorm.DB) {
if err := 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; err != nil {
color.Danger.Println("authority_menu视图已存在!")
return
}
color.Info.Println("authority_menu视图创建成功!")
}
+108
View File
@@ -0,0 +1,108 @@
package datas
import (
"gin-vue-admin/global"
"gin-vue-admin/model"
"github.com/gookit/color"
"os"
"time"
"gorm.io/gorm"
)
var Apis = []model.SysApi{
{global.GVA_MODEL{ID: 1, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/base/login", "用户登录", "base", "POST"},
{global.GVA_MODEL{ID: 2, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/user/register", "用户注册", "user", "POST"},
{global.GVA_MODEL{ID: 3, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/api/createApi", "创建api", "api", "POST"},
{global.GVA_MODEL{ID: 4, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/api/getApiList", "获取api列表", "api", "POST"},
{global.GVA_MODEL{ID: 5, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/api/getApiById", "获取api详细信息", "api", "POST"},
{global.GVA_MODEL{ID: 6, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/api/deleteApi", "删除Api", "api", "POST"},
{global.GVA_MODEL{ID: 7, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/api/updateApi", "更新Api", "api", "POST"},
{global.GVA_MODEL{ID: 8, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/api/getAllApis", "获取所有api", "api", "POST"},
{global.GVA_MODEL{ID: 9, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/authority/createAuthority", "创建角色", "authority", "POST"},
{global.GVA_MODEL{ID: 10, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/authority/deleteAuthority", "删除角色", "authority", "POST"},
{global.GVA_MODEL{ID: 11, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/authority/getAuthorityList", "获取角色列表", "authority", "POST"},
{global.GVA_MODEL{ID: 12, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/menu/getMenu", "获取菜单树", "menu", "POST"},
{global.GVA_MODEL{ID: 13, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/menu/getMenuList", "分页获取基础menu列表", "menu", "POST"},
{global.GVA_MODEL{ID: 14, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/menu/addBaseMenu", "新增菜单", "menu", "POST"},
{global.GVA_MODEL{ID: 15, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/menu/getBaseMenuTree", "获取用户动态路由", "menu", "POST"},
{global.GVA_MODEL{ID: 16, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/menu/addMenuAuthority", "增加menu和角色关联关系", "menu", "POST"},
{global.GVA_MODEL{ID: 17, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/menu/getMenuAuthority", "获取指定角色menu", "menu", "POST"},
{global.GVA_MODEL{ID: 18, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/menu/deleteBaseMenu", "删除菜单", "menu", "POST"},
{global.GVA_MODEL{ID: 19, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/menu/updateBaseMenu", "更新菜单", "menu", "POST"},
{global.GVA_MODEL{ID: 20, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/menu/getBaseMenuById", "根据id获取菜单", "menu", "POST"},
{global.GVA_MODEL{ID: 21, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/user/changePassword", "修改密码", "user", "POST"},
{global.GVA_MODEL{ID: 23, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/user/getUserList", "获取用户列表", "user", "POST"},
{global.GVA_MODEL{ID: 24, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/user/setUserAuthority", "修改用户角色", "user", "POST"},
{global.GVA_MODEL{ID: 25, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/fileUploadAndDownload/upload", "文件上传示例", "fileUploadAndDownload", "POST"},
{global.GVA_MODEL{ID: 26, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/fileUploadAndDownload/getFileList", "获取上传文件列表", "fileUploadAndDownload", "POST"},
{global.GVA_MODEL{ID: 27, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/casbin/updateCasbin", "更改角色api权限", "casbin", "POST"},
{global.GVA_MODEL{ID: 28, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/casbin/getPolicyPathByAuthorityId", "获取权限列表", "casbin", "POST"},
{global.GVA_MODEL{ID: 29, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/fileUploadAndDownload/deleteFile", "删除文件", "fileUploadAndDownload", "POST"},
{global.GVA_MODEL{ID: 30, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/jwt/jsonInBlacklist", "jwt加入黑名单", "jwt", "POST"},
{global.GVA_MODEL{ID: 31, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/authority/setDataAuthority", "设置角色资源权限", "authority", "POST"},
{global.GVA_MODEL{ID: 32, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/system/getSystemConfig", "获取配置文件内容", "system", "POST"},
{global.GVA_MODEL{ID: 33, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/system/setSystemConfig", "设置配置文件内容", "system", "POST"},
{global.GVA_MODEL{ID: 34, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/customer/customer", "创建客户", "customer", "POST"},
{global.GVA_MODEL{ID: 35, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/customer/customer", "更新客户", "customer", "PUT"},
{global.GVA_MODEL{ID: 36, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/customer/customer", "删除客户", "customer", "DELETE"},
{global.GVA_MODEL{ID: 37, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/customer/customer", "获取单一客户", "customer", "GET"},
{global.GVA_MODEL{ID: 38, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/customer/customerList", "获取客户列表", "customer", "GET"},
{global.GVA_MODEL{ID: 39, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/casbin/casbinTest/:pathParam", "RESTFUL模式测试", "casbin", "GET"},
{global.GVA_MODEL{ID: 40, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/autoCode/createTemp", "自动化代码", "autoCode", "POST"},
{global.GVA_MODEL{ID: 41, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/authority/updateAuthority", "更新角色信息", "authority", "PUT"},
{global.GVA_MODEL{ID: 42, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/authority/copyAuthority", "拷贝角色", "authority", "POST"},
{global.GVA_MODEL{ID: 43, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/user/deleteUser", "删除用户", "user", "DELETE"},
{global.GVA_MODEL{ID: 44, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/sysDictionaryDetail/createSysDictionaryDetail", "新增字典内容", "sysDictionaryDetail", "POST"},
{global.GVA_MODEL{ID: 45, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/sysDictionaryDetail/deleteSysDictionaryDetail", "删除字典内容", "sysDictionaryDetail", "DELETE"},
{global.GVA_MODEL{ID: 46, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/sysDictionaryDetail/updateSysDictionaryDetail", "更新字典内容", "sysDictionaryDetail", "PUT"},
{global.GVA_MODEL{ID: 47, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/sysDictionaryDetail/findSysDictionaryDetail", "根据ID获取字典内容", "sysDictionaryDetail", "GET"},
{global.GVA_MODEL{ID: 48, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/sysDictionaryDetail/getSysDictionaryDetailList", "获取字典内容列表", "sysDictionaryDetail", "GET"},
{global.GVA_MODEL{ID: 49, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/sysDictionary/createSysDictionary", "新增字典", "sysDictionary", "POST"},
{global.GVA_MODEL{ID: 50, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/sysDictionary/deleteSysDictionary", "删除字典", "sysDictionary", "DELETE"},
{global.GVA_MODEL{ID: 51, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/sysDictionary/updateSysDictionary", "更新字典", "sysDictionary", "PUT"},
{global.GVA_MODEL{ID: 52, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/sysDictionary/findSysDictionary", "根据ID获取字典", "sysDictionary", "GET"},
{global.GVA_MODEL{ID: 53, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/sysDictionary/getSysDictionaryList", "获取字典列表", "sysDictionary", "GET"},
{global.GVA_MODEL{ID: 54, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/sysOperationRecord/createSysOperationRecord", "新增操作记录", "sysOperationRecord", "POST"},
{global.GVA_MODEL{ID: 55, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/sysOperationRecord/deleteSysOperationRecord", "删除操作记录", "sysOperationRecord", "DELETE"},
{global.GVA_MODEL{ID: 56, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/sysOperationRecord/findSysOperationRecord", "根据ID获取操作记录", "sysOperationRecord", "GET"},
{global.GVA_MODEL{ID: 57, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/sysOperationRecord/getSysOperationRecordList", "获取操作记录列表", "sysOperationRecord", "GET"},
{global.GVA_MODEL{ID: 58, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/autoCode/getTables", "获取数据库表", "autoCode", "GET"},
{global.GVA_MODEL{ID: 59, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/autoCode/getDB", "获取所有数据库", "autoCode", "GET"},
{global.GVA_MODEL{ID: 60, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/autoCode/getColumn", "获取所选table的所有字段", "autoCode", "GET"},
{global.GVA_MODEL{ID: 61, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/sysOperationRecord/deleteSysOperationRecordByIds", "批量删除操作历史", "sysOperationRecord", "DELETE"},
{global.GVA_MODEL{ID: 62, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/simpleUploader/upload", "插件版分片上传", "simpleUploader", "POST"},
{global.GVA_MODEL{ID: 63, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/simpleUploader/checkFileMd5", "文件完整度验证", "simpleUploader", "GET"},
{global.GVA_MODEL{ID: 64, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/simpleUploader/mergeFileMd5", "上传完成合并文件", "simpleUploader", "GET"},
{global.GVA_MODEL{ID: 65, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/user/setUserInfo", "设置用户信息", "user", "PUT"},
{global.GVA_MODEL{ID: 66, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/system/getServerInfo", "获取服务器信息", "system", "POST"},
{global.GVA_MODEL{ID: 67, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/email/emailTest", "发送测试邮件", "email", "POST"},
{global.GVA_MODEL{ID: 68, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/workflowProcess/createWorkflowProcess", "新建工作流", "workflowProcess", "POST"},
{global.GVA_MODEL{ID: 69, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/workflowProcess/deleteWorkflowProcess", "删除工作流", "workflowProcess", "DELETE"},
{global.GVA_MODEL{ID: 70, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/workflowProcess/deleteWorkflowProcessByIds", "批量删除工作流", "workflowProcess", "DELETE"},
{global.GVA_MODEL{ID: 71, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/workflowProcess/updateWorkflowProcess", "更新工作流", "workflowProcess", "PUT"},
{global.GVA_MODEL{ID: 72, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/workflowProcess/findWorkflowProcess", "根据ID获取工作流", "workflowProcess", "GET"},
{global.GVA_MODEL{ID: 73, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/workflowProcess/getWorkflowProcessList", "获取工作流", "workflowProcess", "GET"},
{global.GVA_MODEL{ID: 74, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/workflowProcess/findWorkflowStep", "获取工作流步骤", "workflowProcess", "GET"},
{global.GVA_MODEL{ID: 75, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/workflowProcess/startWorkflow", "启动工作流", "workflowProcess", "POST"},
{global.GVA_MODEL{ID: 76, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/workflowProcess/getMyStated", "获取我发起的工作流", "workflowProcess", "GET"},
{global.GVA_MODEL{ID: 77, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/workflowProcess/getMyNeed", "获取我的待办", "workflowProcess", "GET"},
{global.GVA_MODEL{ID: 78, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/workflowProcess/getWorkflowMoveByID", "根据id获取当前节点详情和历史", "workflowProcess", "GET"},
{global.GVA_MODEL{ID: 79, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/workflowProcess/completeWorkflowMove", "提交工作流", "workflowProcess", "POST"},
}
func InitSysApi(db *gorm.DB) {
if err := db.Transaction(func(tx *gorm.DB) error {
if tx.Where("id IN ?", []int{1, 67}).Find(&[]model.SysApi{}).RowsAffected == 2 {
color.Danger.Println("sys_apis表的初始数据已存在!")
return nil
}
if err := tx.Create(&Apis).Error; err != nil { // 遇到错误时回滚事务
return err
}
return nil
}); err != nil {
color.Warn.Printf("[Mysql]--> sys_apis 表的初始数据失败,err: %v\n", err)
os.Exit(0)
}
}
+32
View File
@@ -0,0 +1,32 @@
package datas
import (
"github.com/gookit/color"
"os"
"time"
"gin-vue-admin/model"
"gorm.io/gorm"
)
var Authorities = []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"},
}
func InitSysAuthority(db *gorm.DB) {
if err := db.Transaction(func(tx *gorm.DB) error {
if tx.Where("authority_id IN ? ", []string{"888", "9528"}).Find(&[]model.SysAuthority{}).RowsAffected == 2 {
color.Danger.Println("sys_authorities表的初始数据已存在!")
return nil
}
if err := tx.Create(&Authorities).Error; err != nil { // 遇到错误时回滚事务
return err
}
return nil
}); err != nil {
color.Warn.Printf("[Mysql]--> sys_authorities 表的初始数据失败,err: %v\n", err)
os.Exit(0)
}
}
+36
View File
@@ -0,0 +1,36 @@
package datas
import (
"github.com/gookit/color"
"gorm.io/gorm"
"os"
)
type SysDataAuthorityId struct {
SysAuthorityAuthorityId string
DataAuthorityIdAuthorityId string
}
var DataAuthorityId = []SysDataAuthorityId{
{"888", "888"},
{"888", "8881"},
{"888", "9528"},
{"9528", "8881"},
{"9528", "9528"},
}
func InitSysDataAuthorityId(db *gorm.DB) {
if err := db.Table("sys_data_authority_id").Transaction(func(tx *gorm.DB) error {
if tx.Where("sys_authority_authority_id IN ?", []string{"888", "9528"}).Find(&[]SysDataAuthorityId{}).RowsAffected == 5 {
color.Danger.Println("sys_data_authority_id表的初始数据已存在!")
return nil
}
if err := tx.Create(&DataAuthorityId).Error; err != nil { // 遇到错误时回滚事务
return err
}
return nil
}); err != nil {
color.Warn.Printf("[Mysql]--> sys_data_authority_id 表的初始数据失败,err: %v\n", err)
os.Exit(0)
}
}
+90
View File
@@ -0,0 +1,90 @@
package datas
import (
"github.com/gookit/color"
"gorm.io/gorm"
"os"
)
type SysAuthorityMenus struct {
SysAuthorityAuthorityId string
SysBaseMenuId uint
}
var AuthorityMenus = []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},
{"888", 27},
{"888", 28},
{"888", 29},
{"888", 30},
{"888", 31},
{"888", 32},
{"888", 33},
{"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},
}
func InitSysAuthorityMenus(db *gorm.DB) {
if err := db.Table("sys_authority_menus").Transaction(func(tx *gorm.DB) error {
if tx.Where("sys_authority_authority_id IN ?", []string{"888", "8881", "9528"}).Find(&[]SysAuthorityMenus{}).RowsAffected == 53 {
color.Danger.Println("sys_authority_menus表的初始数据已存在!")
return nil
}
if err := tx.Create(&AuthorityMenus).Error; err != nil { // 遇到错误时回滚事务
return err
}
return nil
}); err != nil {
color.Warn.Printf("[Mysql]--> sys_authority_menus 表的初始数据失败,err: %v\n", err)
os.Exit(0)
}
}
+181
View File
@@ -0,0 +1,181 @@
package datas
import (
gormadapter "github.com/casbin/gorm-adapter/v3"
"github.com/gookit/color"
"gorm.io/gorm"
"os"
)
var Carbines = []gormadapter.CasbinRule{
{PType: "p", V0: "888", V1: "/base/login", V2: "POST"},
{PType: "p", V0: "888", V1: "/user/register", V2: "POST"},
{PType: "p", V0: "888", V1: "/api/createApi", V2: "POST"},
{PType: "p", V0: "888", V1: "/api/getApiList", V2: "POST"},
{PType: "p", V0: "888", V1: "/api/getApiById", V2: "POST"},
{PType: "p", V0: "888", V1: "/api/deleteApi", V2: "POST"},
{PType: "p", V0: "888", V1: "/api/updateApi", V2: "POST"},
{PType: "p", V0: "888", V1: "/api/getAllApis", V2: "POST"},
{PType: "p", V0: "888", V1: "/authority/createAuthority", V2: "POST"},
{PType: "p", V0: "888", V1: "/authority/deleteAuthority", V2: "POST"},
{PType: "p", V0: "888", V1: "/authority/getAuthorityList", V2: "POST"},
{PType: "p", V0: "888", V1: "/authority/setDataAuthority", V2: "POST"},
{PType: "p", V0: "888", V1: "/authority/updateAuthority", V2: "PUT"},
{PType: "p", V0: "888", V1: "/authority/copyAuthority", V2: "POST"},
{PType: "p", V0: "888", V1: "/menu/getMenu", V2: "POST"},
{PType: "p", V0: "888", V1: "/menu/getMenuList", V2: "POST"},
{PType: "p", V0: "888", V1: "/menu/addBaseMenu", V2: "POST"},
{PType: "p", V0: "888", V1: "/menu/getBaseMenuTree", V2: "POST"},
{PType: "p", V0: "888", V1: "/menu/addMenuAuthority", V2: "POST"},
{PType: "p", V0: "888", V1: "/menu/getMenuAuthority", V2: "POST"},
{PType: "p", V0: "888", V1: "/menu/deleteBaseMenu", V2: "POST"},
{PType: "p", V0: "888", V1: "/menu/updateBaseMenu", V2: "POST"},
{PType: "p", V0: "888", V1: "/menu/getBaseMenuById", V2: "POST"},
{PType: "p", V0: "888", V1: "/user/changePassword", V2: "POST"},
{PType: "p", V0: "888", V1: "/user/getUserList", V2: "POST"},
{PType: "p", V0: "888", V1: "/user/setUserAuthority", V2: "POST"},
{PType: "p", V0: "888", V1: "/user/deleteUser", V2: "DELETE"},
{PType: "p", V0: "888", V1: "/fileUploadAndDownload/upload", V2: "POST"},
{PType: "p", V0: "888", V1: "/fileUploadAndDownload/getFileList", V2: "POST"},
{PType: "p", V0: "888", V1: "/fileUploadAndDownload/deleteFile", V2: "POST"},
{PType: "p", V0: "888", V1: "/casbin/updateCasbin", V2: "POST"},
{PType: "p", V0: "888", V1: "/casbin/getPolicyPathByAuthorityId", V2: "POST"},
{PType: "p", V0: "888", V1: "/casbin/casbinTest/:pathParam", V2: "GET"},
{PType: "p", V0: "888", V1: "/jwt/jsonInBlacklist", V2: "POST"},
{PType: "p", V0: "888", V1: "/system/getSystemConfig", V2: "POST"},
{PType: "p", V0: "888", V1: "/system/setSystemConfig", V2: "POST"},
{PType: "p", V0: "888", V1: "/system/getServerInfo", V2: "POST"},
{PType: "p", V0: "888", V1: "/customer/customer", V2: "POST"},
{PType: "p", V0: "888", V1: "/customer/customer", V2: "PUT"},
{PType: "p", V0: "888", V1: "/customer/customer", V2: "DELETE"},
{PType: "p", V0: "888", V1: "/customer/customer", V2: "GET"},
{PType: "p", V0: "888", V1: "/customer/customerList", V2: "GET"},
{PType: "p", V0: "888", V1: "/autoCode/createTemp", V2: "POST"},
{PType: "p", V0: "888", V1: "/autoCode/getTables", V2: "GET"},
{PType: "p", V0: "888", V1: "/autoCode/getDB", V2: "GET"},
{PType: "p", V0: "888", V1: "/autoCode/getColumn", V2: "GET"},
{PType: "p", V0: "888", V1: "/sysDictionaryDetail/createSysDictionaryDetail", V2: "POST"},
{PType: "p", V0: "888", V1: "/sysDictionaryDetail/deleteSysDictionaryDetail", V2: "DELETE"},
{PType: "p", V0: "888", V1: "/sysDictionaryDetail/updateSysDictionaryDetail", V2: "PUT"},
{PType: "p", V0: "888", V1: "/sysDictionaryDetail/findSysDictionaryDetail", V2: "GET"},
{PType: "p", V0: "888", V1: "/sysDictionaryDetail/getSysDictionaryDetailList", V2: "GET"},
{PType: "p", V0: "888", V1: "/sysDictionary/createSysDictionary", V2: "POST"},
{PType: "p", V0: "888", V1: "/sysDictionary/deleteSysDictionary", V2: "DELETE"},
{PType: "p", V0: "888", V1: "/sysDictionary/updateSysDictionary", V2: "PUT"},
{PType: "p", V0: "888", V1: "/sysDictionary/findSysDictionary", V2: "GET"},
{PType: "p", V0: "888", V1: "/sysDictionary/getSysDictionaryList", V2: "GET"},
{PType: "p", V0: "888", V1: "/sysOperationRecord/createSysOperationRecord", V2: "POST"},
{PType: "p", V0: "888", V1: "/sysOperationRecord/deleteSysOperationRecord", V2: "DELETE"},
{PType: "p", V0: "888", V1: "/sysOperationRecord/updateSysOperationRecord", V2: "PUT"},
{PType: "p", V0: "888", V1: "/sysOperationRecord/findSysOperationRecord", V2: "GET"},
{PType: "p", V0: "888", V1: "/sysOperationRecord/getSysOperationRecordList", V2: "GET"},
{PType: "p", V0: "888", V1: "/sysOperationRecord/deleteSysOperationRecordByIds", V2: "DELETE"},
{PType: "p", V0: "888", V1: "/user/setUserInfo", V2: "PUT"},
{PType: "p", V0: "888", V1: "/email/emailTest", V2: "POST"},
{PType: "p", V0: "888", V1: "/simpleUploader/upload", V2: "POST"},
{PType: "p", V0: "888", V1: "/simpleUploader/checkFileMd5", V2: "GET"},
{PType: "p", V0: "888", V1: "/simpleUploader/mergeFileMd5", V2: "GET"},
{PType: "p", V0: "888", V1: "/workflowProcess/createWorkflowProcess", V2: "POST"},
{PType: "p", V0: "888", V1: "/workflowProcess/deleteWorkflowProcess", V2: "DELETE"},
{PType: "p", V0: "888", V1: "/workflowProcess/deleteWorkflowProcessByIds", V2: "DELETE"},
{PType: "p", V0: "888", V1: "/workflowProcess/updateWorkflowProcess", V2: "PUT"},
{PType: "p", V0: "888", V1: "/workflowProcess/findWorkflowProcess", V2: "GET"},
{PType: "p", V0: "888", V1: "/workflowProcess/getWorkflowProcessList", V2: "GET"},
{PType: "p", V0: "888", V1: "/workflowProcess/findWorkflowStep", V2: "GET"},
{PType: "p", V0: "888", V1: "/workflowProcess/startWorkflow", V2: "POST"},
{PType: "p", V0: "888", V1: "/workflowProcess/completeWorkflowMove", V2: "POST"},
{PType: "p", V0: "888", V1: "/workflowProcess/getMyStated", V2: "GET"},
{PType: "p", V0: "888", V1: "/workflowProcess/getMyNeed", V2: "GET"},
{PType: "p", V0: "888", V1: "/workflowProcess/getWorkflowMoveByID", V2: "GET"},
{PType: "p", V0: "8881", V1: "/base/login", V2: "POST"},
{PType: "p", V0: "8881", V1: "/user/register", V2: "POST"},
{PType: "p", V0: "8881", V1: "/api/createApi", V2: "POST"},
{PType: "p", V0: "8881", V1: "/api/getApiList", V2: "POST"},
{PType: "p", V0: "8881", V1: "/api/getApiById", V2: "POST"},
{PType: "p", V0: "8881", V1: "/api/deleteApi", V2: "POST"},
{PType: "p", V0: "8881", V1: "/api/updateApi", V2: "POST"},
{PType: "p", V0: "8881", V1: "/api/getAllApis", V2: "POST"},
{PType: "p", V0: "8881", V1: "/authority/createAuthority", V2: "POST"},
{PType: "p", V0: "8881", V1: "/authority/deleteAuthority", V2: "POST"},
{PType: "p", V0: "8881", V1: "/authority/getAuthorityList", V2: "POST"},
{PType: "p", V0: "8881", V1: "/authority/setDataAuthority", V2: "POST"},
{PType: "p", V0: "8881", V1: "/menu/getMenu", V2: "POST"},
{PType: "p", V0: "8881", V1: "/menu/getMenuList", V2: "POST"},
{PType: "p", V0: "8881", V1: "/menu/addBaseMenu", V2: "POST"},
{PType: "p", V0: "8881", V1: "/menu/getBaseMenuTree", V2: "POST"},
{PType: "p", V0: "8881", V1: "/menu/addMenuAuthority", V2: "POST"},
{PType: "p", V0: "8881", V1: "/menu/getMenuAuthority", V2: "POST"},
{PType: "p", V0: "8881", V1: "/menu/deleteBaseMenu", V2: "POST"},
{PType: "p", V0: "8881", V1: "/menu/updateBaseMenu", V2: "POST"},
{PType: "p", V0: "8881", V1: "/menu/getBaseMenuById", V2: "POST"},
{PType: "p", V0: "8881", V1: "/user/changePassword", V2: "POST"},
{PType: "p", V0: "8881", V1: "/user/getUserList", V2: "POST"},
{PType: "p", V0: "8881", V1: "/user/setUserAuthority", V2: "POST"},
{PType: "p", V0: "8881", V1: "/fileUploadAndDownload/upload", V2: "POST"},
{PType: "p", V0: "8881", V1: "/fileUploadAndDownload/getFileList", V2: "POST"},
{PType: "p", V0: "8881", V1: "/fileUploadAndDownload/deleteFile", V2: "POST"},
{PType: "p", V0: "8881", V1: "/casbin/updateCasbin", V2: "POST"},
{PType: "p", V0: "8881", V1: "/casbin/getPolicyPathByAuthorityId", V2: "POST"},
{PType: "p", V0: "8881", V1: "/jwt/jsonInBlacklist", V2: "POST"},
{PType: "p", V0: "8881", V1: "/system/getSystemConfig", V2: "POST"},
{PType: "p", V0: "8881", V1: "/system/setSystemConfig", V2: "POST"},
{PType: "p", V0: "8881", V1: "/customer/customer", V2: "POST"},
{PType: "p", V0: "8881", V1: "/customer/customer", V2: "PUT"},
{PType: "p", V0: "8881", V1: "/customer/customer", V2: "DELETE"},
{PType: "p", V0: "8881", V1: "/customer/customer", V2: "GET"},
{PType: "p", V0: "8881", V1: "/customer/customerList", V2: "GET"},
{PType: "p", V0: "9528", V1: "/base/login", V2: "POST"},
{PType: "p", V0: "9528", V1: "/user/register", V2: "POST"},
{PType: "p", V0: "9528", V1: "/api/createApi", V2: "POST"},
{PType: "p", V0: "9528", V1: "/api/getApiList", V2: "POST"},
{PType: "p", V0: "9528", V1: "/api/getApiById", V2: "POST"},
{PType: "p", V0: "9528", V1: "/api/deleteApi", V2: "POST"},
{PType: "p", V0: "9528", V1: "/api/updateApi", V2: "POST"},
{PType: "p", V0: "9528", V1: "/api/getAllApis", V2: "POST"},
{PType: "p", V0: "9528", V1: "/authority/createAuthority", V2: "POST"},
{PType: "p", V0: "9528", V1: "/authority/deleteAuthority", V2: "POST"},
{PType: "p", V0: "9528", V1: "/authority/getAuthorityList", V2: "POST"},
{PType: "p", V0: "9528", V1: "/authority/setDataAuthority", V2: "POST"},
{PType: "p", V0: "9528", V1: "/menu/getMenu", V2: "POST"},
{PType: "p", V0: "9528", V1: "/menu/getMenuList", V2: "POST"},
{PType: "p", V0: "9528", V1: "/menu/addBaseMenu", V2: "POST"},
{PType: "p", V0: "9528", V1: "/menu/getBaseMenuTree", V2: "POST"},
{PType: "p", V0: "9528", V1: "/menu/addMenuAuthority", V2: "POST"},
{PType: "p", V0: "9528", V1: "/menu/getMenuAuthority", V2: "POST"},
{PType: "p", V0: "9528", V1: "/menu/deleteBaseMenu", V2: "POST"},
{PType: "p", V0: "9528", V1: "/menu/updateBaseMenu", V2: "POST"},
{PType: "p", V0: "9528", V1: "/menu/getBaseMenuById", V2: "POST"},
{PType: "p", V0: "9528", V1: "/user/changePassword", V2: "POST"},
{PType: "p", V0: "9528", V1: "/user/getUserList", V2: "POST"},
{PType: "p", V0: "9528", V1: "/user/setUserAuthority", V2: "POST"},
{PType: "p", V0: "9528", V1: "/fileUploadAndDownload/upload", V2: "POST"},
{PType: "p", V0: "9528", V1: "/fileUploadAndDownload/getFileList", V2: "POST"},
{PType: "p", V0: "9528", V1: "/fileUploadAndDownload/deleteFile", V2: "POST"},
{PType: "p", V0: "9528", V1: "/casbin/updateCasbin", V2: "POST"},
{PType: "p", V0: "9528", V1: "/casbin/getPolicyPathByAuthorityId", V2: "POST"},
{PType: "p", V0: "9528", V1: "/jwt/jsonInBlacklist", V2: "POST"},
{PType: "p", V0: "9528", V1: "/system/getSystemConfig", V2: "POST"},
{PType: "p", V0: "9528", V1: "/system/setSystemConfig", V2: "POST"},
{PType: "p", V0: "9528", V1: "/customer/customer", V2: "POST"},
{PType: "p", V0: "9528", V1: "/customer/customer", V2: "PUT"},
{PType: "p", V0: "9528", V1: "/customer/customer", V2: "DELETE"},
{PType: "p", V0: "9528", V1: "/customer/customer", V2: "GET"},
{PType: "p", V0: "9528", V1: "/customer/customerList", V2: "GET"},
{PType: "p", V0: "9528", V1: "/autoCode/createTemp", V2: "POST"},
}
func InitCasbinModel(db *gorm.DB) {
if err := db.Transaction(func(tx *gorm.DB) error {
if tx.Where("p_type = ? AND v0 IN ?", "p", []string{"888", "8881", "9528"}).Find(&[]gormadapter.CasbinRule{}).RowsAffected == 142 {
color.Danger.Println("casbin_rule表的初始数据已存在!")
return nil
}
if err := tx.Create(&Carbines).Error; err != nil { // 遇到错误时回滚事务
return err
}
return nil
}); err != nil {
color.Warn.Printf("[Mysql]--> casbin_rule 表的初始数据失败,err: %v\n", err)
os.Exit(0)
}
}
+31
View File
@@ -0,0 +1,31 @@
package datas
import (
"gin-vue-admin/global"
"github.com/gookit/color"
"os"
"time"
"gin-vue-admin/model"
"gorm.io/gorm"
)
var Customers = []model.ExaCustomer{
{GVA_MODEL: global.GVA_MODEL{ID: 1, CreatedAt: time.Now(), UpdatedAt: time.Now()}, CustomerName: "测试客户", CustomerPhoneData: "1761111111", SysUserID: 1, SysUserAuthorityID: "888"},
}
func InitExaCustomer(db *gorm.DB) {
if err := db.Transaction(func(tx *gorm.DB) error {
if tx.Where("id IN ? ", []int{1}).Find(&[]model.ExaCustomer{}).RowsAffected == 1 {
color.Danger.Println("exa_customers表的初始数据已存在!")
return nil
}
if err := tx.Create(&Customers).Error; err != nil { // 遇到错误时回滚事务
return err
}
return nil
}); err != nil {
color.Warn.Printf("[Mysql]--> exa_customers 表的初始数据失败,err: %v\n", err)
os.Exit(0)
}
}
+37
View File
@@ -0,0 +1,37 @@
package datas
import (
"gin-vue-admin/global"
"github.com/gookit/color"
"os"
"time"
"gin-vue-admin/model"
"gorm.io/gorm"
)
func InitSysDictionary(db *gorm.DB) {
var status = new(bool)
*status = true
Dictionaries := []model.SysDictionary{
{GVA_MODEL: global.GVA_MODEL{ID: 1, CreatedAt: time.Now(), UpdatedAt: time.Now()}, Name: "性别", Type: "sex", Status: status, Desc: "性别字典"},
{GVA_MODEL: global.GVA_MODEL{ID: 2, CreatedAt: time.Now(), UpdatedAt: time.Now()}, Name: "数据库int类型", Type: "int", Status: status, Desc: "int类型对应的数据库类型"},
{GVA_MODEL: global.GVA_MODEL{ID: 3, CreatedAt: time.Now(), UpdatedAt: time.Now()}, Name: "数据库时间日期类型", Type: "time.Time", Status: status, Desc: "数据库时间日期类型"},
{GVA_MODEL: global.GVA_MODEL{ID: 4, CreatedAt: time.Now(), UpdatedAt: time.Now()}, Name: "数据库浮点型", Type: "float64", Status: status, Desc: "数据库浮点型"},
{GVA_MODEL: global.GVA_MODEL{ID: 5, CreatedAt: time.Now(), UpdatedAt: time.Now()}, Name: "数据库字符串", Type: "string", Status: status, Desc: "数据库字符串"},
{GVA_MODEL: global.GVA_MODEL{ID: 6, CreatedAt: time.Now(), UpdatedAt: time.Now()}, Name: "数据库bool类型", Type: "bool", Status: status, Desc: "数据库bool类型"},
}
if err := db.Transaction(func(tx *gorm.DB) error {
if tx.Where("id IN ?", []int{1, 6}).Find(&[]model.SysDictionary{}).RowsAffected == 2 {
color.Danger.Println("sys_dictionaries表的初始数据已存在!")
return nil
}
if err := tx.Create(&Dictionaries).Error; err != nil { // 遇到错误时回滚事务
return err
}
return nil
}); err != nil {
color.Warn.Printf("[Mysql]--> sys_dictionaries 表的初始数据失败,err: %v\n", err)
os.Exit(0)
}
}
+54
View File
@@ -0,0 +1,54 @@
package datas
import (
"gin-vue-admin/global"
"github.com/gookit/color"
"os"
"time"
"gin-vue-admin/model"
"gorm.io/gorm"
)
func InitSysDictionaryDetail(db *gorm.DB) {
status := new(bool)
*status = true
DictionaryDetail := []model.SysDictionaryDetail{
{global.GVA_MODEL{ID: 1, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "smallint", 1, status, 1, 2},
{global.GVA_MODEL{ID: 2, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "mediumint", 2, status, 2, 2},
{global.GVA_MODEL{ID: 3, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "int", 3, status, 3, 2},
{global.GVA_MODEL{ID: 4, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "bigint", 4, status, 4, 2},
{global.GVA_MODEL{ID: 5, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "date", 0, status, 0, 3},
{global.GVA_MODEL{ID: 6, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "time", 1, status, 1, 3},
{global.GVA_MODEL{ID: 7, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "year", 2, status, 2, 3},
{global.GVA_MODEL{ID: 8, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "datetime", 3, status, 3, 3},
{global.GVA_MODEL{ID: 9, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "timestamp", 5, status, 5, 3},
{global.GVA_MODEL{ID: 10, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "float", 0, status, 0, 4},
{global.GVA_MODEL{ID: 11, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "double", 1, status, 1, 4},
{global.GVA_MODEL{ID: 12, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "decimal", 2, status, 2, 4},
{global.GVA_MODEL{ID: 13, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "char", 0, status, 0, 5},
{global.GVA_MODEL{ID: 14, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "varchar", 1, status, 1, 5},
{global.GVA_MODEL{ID: 15, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "tinyblob", 2, status, 2, 5},
{global.GVA_MODEL{ID: 16, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "tinytext", 3, status, 3, 5},
{global.GVA_MODEL{ID: 17, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "text", 4, status, 4, 5},
{global.GVA_MODEL{ID: 18, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "blob", 5, status, 5, 5},
{global.GVA_MODEL{ID: 19, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "mediumblob", 6, status, 6, 5},
{global.GVA_MODEL{ID: 20, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "mediumtext", 7, status, 7, 5},
{global.GVA_MODEL{ID: 21, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "longblob", 8, status, 8, 5},
{global.GVA_MODEL{ID: 22, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "longtext", 9, status, 9, 5},
{global.GVA_MODEL{ID: 23, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "tinyint", 0, status, 0, 6},
}
if err := db.Transaction(func(tx *gorm.DB) error {
if tx.Where("id IN ?", []int{1, 23}).Find(&[]model.SysDictionaryDetail{}).RowsAffected == 2 {
color.Danger.Println("sys_dictionary_details表的初始数据已存在!")
return nil
}
if err := tx.Create(&DictionaryDetail).Error; err != nil { // 遇到错误时回滚事务
return err
}
return nil
}); err != nil {
color.Warn.Printf("[Mysql]--> sys_dictionary_details 表的初始数据失败,err: %v\n", err)
os.Exit(0)
}
}
+33
View File
@@ -0,0 +1,33 @@
package datas
import (
"gin-vue-admin/global"
"github.com/gookit/color"
"os"
"time"
"gin-vue-admin/model"
"gorm.io/gorm"
)
var Files = []model.ExaFileUploadAndDownload{
{global.GVA_MODEL{ID: 1, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "10.png", "http://qmplusimg.henrongyi.top/gvalogo.png", "png", "158787308910.png"},
{global.GVA_MODEL{ID: 2, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "logo.png", "http://qmplusimg.henrongyi.top/1576554439myAvatar.png", "png", "1587973709logo.png"},
}
func InitExaFileUploadAndDownload(db *gorm.DB) {
if err := db.Transaction(func(tx *gorm.DB) error {
if tx.Where("id IN ?", []int{1, 2}).Find(&[]model.ExaFileUploadAndDownload{}).RowsAffected == 2 {
color.Danger.Println("exa_file_upload_and_downloads表的初始数据已存在!")
return nil
}
if err := tx.Create(&Files).Error; err != nil { // 遇到错误时回滚事务
return err
}
color.Info.Println("[Mysql]-->初始化数据成功")
return nil
}); err != nil {
color.Warn.Printf("[Mysql]--> exa_file_upload_and_downloads 表的初始数据失败,err: %v\n", err)
os.Exit(0)
}
}
+58
View File
@@ -0,0 +1,58 @@
package datas
import (
"gin-vue-admin/model"
gormadapter "github.com/casbin/gorm-adapter/v3"
"github.com/gookit/color"
"gorm.io/gorm"
"os"
)
func InitMysqlData(db *gorm.DB) {
InitSysApi(db)
InitSysUser(db)
InitExaCustomer(db)
InitCasbinModel(db)
InitSysAuthority(db)
InitSysBaseMenus(db)
InitAuthorityMenu(db)
InitSysDictionary(db)
InitSysAuthorityMenus(db)
InitSysDataAuthorityId(db)
InitSysDictionaryDetail(db)
InitExaFileUploadAndDownload(db)
InitWkProcess(db)
}
func InitMysqlTables(db *gorm.DB) {
var err error
if !db.Migrator().HasTable("casbin_rule") {
err = db.Migrator().CreateTable(&gormadapter.CasbinRule{})
}
err = db.AutoMigrate(
model.SysApi{},
model.SysUser{},
model.ExaFile{},
model.ExaCustomer{},
model.SysBaseMenu{},
model.SysAuthority{},
model.JwtBlacklist{},
model.ExaFileChunk{},
model.SysDictionary{},
model.ExaSimpleUploader{},
model.SysOperationRecord{},
model.SysDictionaryDetail{},
model.SysBaseMenuParameter{},
model.ExaFileUploadAndDownload{},
model.WorkflowProcess{},
model.WorkflowNode{},
model.WorkflowEdge{},
model.WorkflowStartPoint{},
model.WorkflowEndPoint{},
)
if err != nil {
color.Warn.Printf("[Mysql]-->初始化数据表失败,err: %v\n", err)
os.Exit(0)
}
color.Info.Println("[Mysql]-->初始化数据表成功")
}
+63
View File
@@ -0,0 +1,63 @@
package datas
import (
"gin-vue-admin/global"
"github.com/gookit/color"
"os"
"time"
"gin-vue-admin/model"
"gorm.io/gorm"
)
var BaseMenus = []model.SysBaseMenu{
{GVA_MODEL: global.GVA_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"}},
{GVA_MODEL: global.GVA_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"}},
{GVA_MODEL: global.GVA_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"}},
{GVA_MODEL: global.GVA_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"}},
{GVA_MODEL: global.GVA_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}},
{GVA_MODEL: global.GVA_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}},
{GVA_MODEL: global.GVA_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"}},
{GVA_MODEL: global.GVA_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"}},
{GVA_MODEL: global.GVA_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"}},
{GVA_MODEL: global.GVA_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"}},
{GVA_MODEL: global.GVA_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"}},
{GVA_MODEL: global.GVA_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"}},
{GVA_MODEL: global.GVA_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"}},
{GVA_MODEL: global.GVA_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"}},
{GVA_MODEL: global.GVA_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"}},
{GVA_MODEL: global.GVA_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"}},
{GVA_MODEL: global.GVA_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"}},
{GVA_MODEL: global.GVA_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}},
{GVA_MODEL: global.GVA_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}},
{GVA_MODEL: global.GVA_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"}},
{GVA_MODEL: global.GVA_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"}},
{GVA_MODEL: global.GVA_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"}},
{GVA_MODEL: global.GVA_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"}},
{GVA_MODEL: global.GVA_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"}},
{GVA_MODEL: global.GVA_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"}},
{GVA_MODEL: global.GVA_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"}},
{GVA_MODEL: global.GVA_MODEL{ID: 27, CreatedAt: time.Now(), UpdatedAt: time.Now()}, MenuLevel: 0, ParentId: "0", Path: "state", Name: "state", Hidden: false, Component: "view/system/state.vue", Sort: 6, Meta: model.Meta{Title: "服务器状态", Icon: "cloudy"}},
{GVA_MODEL: global.GVA_MODEL{ID: 28, CreatedAt: time.Now(), UpdatedAt: time.Now()}, MenuLevel: 0, ParentId: "0", Path: "workflow", Name: "workflow", Hidden: false, Component: "view/workflow/index.vue", Sort: 5, Meta: model.Meta{Title: "工作流功能", Icon: "phone"}},
{GVA_MODEL: global.GVA_MODEL{ID: 29, CreatedAt: time.Now(), UpdatedAt: time.Now()}, MenuLevel: 0, ParentId: "28", Path: "workflowCreate", Name: "workflowCreate", Hidden: false, Component: "view/workflow/workflowCreate/workflowCreate.vue", Sort: 0, Meta: model.Meta{Title: "工作流绘制", Icon: "circle-plus"}},
{GVA_MODEL: global.GVA_MODEL{ID: 30, CreatedAt: time.Now(), UpdatedAt: time.Now()}, MenuLevel: 0, ParentId: "28", Path: "workflowProcess", Name: "workflowProcess", Hidden: false, Component: "view/workflow/workflowProcess/workflowProcess.vue", Sort: 0, Meta: model.Meta{Title: "工作流列表", Icon: "s-cooperation"}},
{GVA_MODEL: global.GVA_MODEL{ID: 31, CreatedAt: time.Now(), UpdatedAt: time.Now()}, MenuLevel: 0, ParentId: "28", Path: "workflowUse", Name: "workflowUse", Hidden: true, Component: "view/workflow/workflowUse/workflowUse.vue", Sort: 0, Meta: model.Meta{Title: "使用工作流", Icon: "video-play"}},
{GVA_MODEL: global.GVA_MODEL{ID: 32, CreatedAt: time.Now(), UpdatedAt: time.Now()}, MenuLevel: 0, ParentId: "28", Path: "started", Name: "started", Hidden: false, Component: "view/workflow/userList/started.vue", Sort: 0, Meta: model.Meta{Title: "我发起的", Icon: "s-order"}},
{GVA_MODEL: global.GVA_MODEL{ID: 33, CreatedAt: time.Now(), UpdatedAt: time.Now()}, MenuLevel: 0, ParentId: "28", Path: "need", Name: "need", Hidden: false, Component: "view/workflow/userList/need.vue", Sort: 0, Meta: model.Meta{Title: "我的待办", Icon: "s-platform"}},
}
func InitSysBaseMenus(db *gorm.DB) {
if err := db.Transaction(func(tx *gorm.DB) error {
if tx.Where("id IN ?", []int{1, 27}).Find(&[]model.SysBaseMenu{}).RowsAffected == 2 {
color.Danger.Println("sys_base_menus表的初始数据已存在!")
return nil
}
if err := tx.Create(&BaseMenus).Error; err != nil { // 遇到错误时回滚事务
return err
}
return nil
}); err != nil {
color.Warn.Printf("[Mysql]--> sys_base_menus 表的初始数据失败,err: %v\n", err)
os.Exit(0)
}
}
+62
View File
@@ -0,0 +1,62 @@
package datas
import (
"gin-vue-admin/global"
"gin-vue-admin/model"
"github.com/gookit/color"
"gorm.io/gorm"
"os"
"time"
)
var WorkflowProcess = []model.WorkflowProcess{
{ID: "leaveFlow", CreatedAt: time.Now(), UpdatedAt: time.Now(), Name: "leaveFlow", Clazz: "process", Label: "请假流程(演示)", HideIcon: false, Description: "请假流程演示", View: "view/iconList/index.vue"},
}
var WorkflowNodes = []model.WorkflowNode{
{ID: "end1603681358043", CreatedAt: time.Now(), UpdatedAt: time.Now(), WorkflowProcessID: "leaveFlow", Clazz: "end", Label: "请假失败", Type: "end-node", Shape: "end-node", Description: "", View: "view/exa_wf_leave/exa_wf_leaveFrom.vue", X: 302, Y: 545.5, HideIcon: false, AssignType: "", AssignValue: "", Success: false},
{ID: "end1603681360882", CreatedAt: time.Now(), UpdatedAt: time.Now(), WorkflowProcessID: "leaveFlow", Clazz: "end", Label: "请假成功", Type: "end-node", Shape: "end-node", Description: "请假完成,具体结果等待提交", View: "view/exa_wf_leave/exa_wf_leaveFrom.vue", X: 83.5, Y: 546, HideIcon: false, AssignType: "", AssignValue: "", Success: true},
{ID: "start1603681292875", CreatedAt: time.Now(), UpdatedAt: time.Now(), WorkflowProcessID: "leaveFlow", Clazz: "start", Label: "发起请假", Type: "start-node", Shape: "start-node", Description: "发起一个请假流程", View: "view/exa_wf_leave/exa_wf_leaveFrom.vue", X: 201, Y: 109, HideIcon: false, AssignType: "", AssignValue: "", Success: false},
{ID: "userTask1603681299962", CreatedAt: time.Now(), UpdatedAt: time.Now(), WorkflowProcessID: "leaveFlow", Clazz: "userTask", Label: "审批", Type: "user-task-node", Shape: "user-task-node", Description: "审批会签", View: "view/exa_wf_leave/exa_wf_leaveFrom.vue", X: 202, Y: 320.5, HideIcon: false, AssignType: "user", AssignValue: ",1,2,", Success: false},
}
var WorkflowEdge = []model.WorkflowEdge{
{ID: "flow1604985849039", CreatedAt: time.Now(), UpdatedAt: time.Now(), WorkflowProcessID: "leaveFlow", Clazz: "flow", Source: "start1603681292875", Target: "userTask1603681299962", SourceAnchor: 1, TargetAnchor: 3, Shape: "flow-polyline-round", Label: "", HideIcon: false, ConditionExpression: "", Reverse: false},
{ID: "flow1604985879574", CreatedAt: time.Now(), UpdatedAt: time.Now(), WorkflowProcessID: "leaveFlow", Clazz: "flow", Source: "userTask1603681299962", Target: "end1603681360882", SourceAnchor: 0, TargetAnchor: 2, Shape: "flow-polyline-round", Label: "同意", HideIcon: false, ConditionExpression: "yes", Reverse: false},
{ID: "flow1604985881207", CreatedAt: time.Now(), UpdatedAt: time.Now(), WorkflowProcessID: "leaveFlow", Clazz: "flow", Source: "userTask1603681299962", Target: "end1603681358043", SourceAnchor: 2, TargetAnchor: 2, Shape: "flow-polyline-round", Label: "不同意", HideIcon: false, ConditionExpression: "no", Reverse: false},
}
var WorkflowStartPoint = []model.WorkflowStartPoint{
{WorkflowEdgeID: "flow1604985849039", GVA_MODEL: global.GVA_MODEL{ID: 31, CreatedAt: time.Now(), UpdatedAt: time.Now()}, X: 137, Y: 201, Index: 1},
{WorkflowEdgeID: "flow1604985879574", GVA_MODEL: global.GVA_MODEL{ID: 32, CreatedAt: time.Now(), UpdatedAt: time.Now()}, X: 320.5, Y: 174, Index: 0},
{WorkflowEdgeID: "flow1604985881207", GVA_MODEL: global.GVA_MODEL{ID: 33, CreatedAt: time.Now(), UpdatedAt: time.Now()}, X: 320.5, Y: 230, Index: 2},
}
var WorkflowEndPoint = []model.WorkflowEndPoint{
{WorkflowEdgeID: "flow1604985849039", GVA_MODEL: global.GVA_MODEL{ID: 31, CreatedAt: time.Now(), UpdatedAt: time.Now()}, X: 270, Y: 202, Index: 3},
{WorkflowEdgeID: "flow1604985879574", GVA_MODEL: global.GVA_MODEL{ID: 32, CreatedAt: time.Now(), UpdatedAt: time.Now()}, X: 518, Y: 83.5, Index: 2},
{WorkflowEdgeID: "flow1604985881207", GVA_MODEL: global.GVA_MODEL{ID: 33, CreatedAt: time.Now(), UpdatedAt: time.Now()}, X: 517.5, Y: 302, Index: 2},
}
func InitWkProcess(db *gorm.DB) {
if err := db.Transaction(func(tx *gorm.DB) error {
if err := tx.Create(&WorkflowProcess).Error; err != nil { // 遇到错误时回滚事务
return err
}
if err := tx.Create(&WorkflowNodes).Error; err != nil { // 遇到错误时回滚事务
return err
}
if err := tx.Create(&WorkflowEdge).Error; err != nil { // 遇到错误时回滚事务
return err
}
if err := tx.Create(&WorkflowStartPoint).Error; err != nil { // 遇到错误时回滚事务
return err
}
if err := tx.Create(&WorkflowEndPoint).Error; err != nil { // 遇到错误时回滚事务
return err
}
return nil
}); err != nil {
color.Warn.Printf("[Mysql]-->工作流相关 表的初始数据失败,err: %v\n", err)
os.Exit(0)
}
}
+33
View File
@@ -0,0 +1,33 @@
package datas
import (
"gin-vue-admin/global"
"github.com/gookit/color"
"os"
"time"
"gin-vue-admin/model"
uuid "github.com/satori/go.uuid"
"gorm.io/gorm"
)
var Users = []model.SysUser{
{GVA_MODEL: global.GVA_MODEL{ID: 1, CreatedAt: time.Now(), UpdatedAt: time.Now()}, UUID: uuid.NewV4(), Username: "admin", Password: "e10adc3949ba59abbe56e057f20f883e", NickName: "超级管理员", HeaderImg: "http://qmplusimg.henrongyi.top/gva_header.jpg", AuthorityId: "888"},
{GVA_MODEL: global.GVA_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"},
}
func InitSysUser(db *gorm.DB) {
if err := db.Transaction(func(tx *gorm.DB) error {
if tx.Where("id IN ?", []int{1, 2}).Find(&[]model.SysUser{}).RowsAffected == 2 {
color.Danger.Println("sys_users表的初始数据已存在!")
return nil
}
if err := tx.Create(&Users).Error; err != nil { // 遇到错误时回滚事务
return err
}
return nil
}); err != nil {
color.Warn.Printf("[Mysql]--> sys_users 表的初始数据失败,err: %v\n", err)
os.Exit(0)
}
}
+74
View File
@@ -0,0 +1,74 @@
/*
Copyright © 2020 SliverHorn
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package gva
import (
"gin-vue-admin/cmd/datas"
"gin-vue-admin/core"
"gin-vue-admin/initialize"
"github.com/gookit/color"
_ "gin-vue-admin/core"
"gin-vue-admin/global"
"github.com/spf13/cobra"
)
// initdbCmd represents the initdb command
var initdbCmd = &cobra.Command{
Use: "initdb",
Short: "gin-vue-admin初始化数据",
Long: `gin-vue-admin初始化数据适配数据库情况:
1. mysql完美适配,
2. postgresql不能保证完美适配,
3. sqlite未适配,
4. sqlserver未适配`,
Run: func(cmd *cobra.Command, args []string) {
path, _ := cmd.Flags().GetString("path")
global.GVA_VP = core.Viper(path)
global.GVA_LOG = core.Zap() // 初始化zap日志库
db := initialize.GormMysql()
switch global.GVA_CONFIG.System.DbType {
case "mysql":
datas.InitMysqlTables(db)
datas.InitMysqlData(db)
case "postgresql":
color.Info.Println("postgresql功能开发中")
case "sqlite":
color.Info.Println("sqlite功能开发中")
case "sqlserver":
color.Info.Println("sqlserver功能开发中")
default:
datas.InitMysqlTables(db)
datas.InitMysqlData(db)
}
frame, _ := cmd.Flags().GetString("frame")
if frame == "gf" {
color.Info.Println("gf功能开发中")
return
} else {
return
}
},
}
func init() {
rootCmd.AddCommand(initdbCmd)
initdbCmd.Flags().StringP("path", "p", "./config.yaml", "自定配置文件路径(绝对路径)")
initdbCmd.Flags().StringP("frame", "f", "gin", "可选参数为gin,gf")
initdbCmd.Flags().StringP("type", "t", "mysql", "可选参数为mysql,postgresql,sqlite,sqlserver")
}
+94
View File
@@ -0,0 +1,94 @@
/*
Copyright © 2020 SliverHorn
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package gva
import (
"github.com/mitchellh/go-homedir"
"os"
"github.com/gookit/color"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
var cfgFile string
// rootCmd represents the base command when called without any subcommands
var rootCmd = &cobra.Command{
Use: "gva",
Short: "这是一款amazing的终端工具",
Long: `欢迎使用gva终端工具
________ ____ ____ _____
/ _____/ \ \ / / / _ \
/ \ ___ \ Y / / /_\ \
\ \_\ \ \ / / | \
\______ / \___/ \____|__ /
\/ \/
`,
// Uncomment the following line if your bare application
// has an action associated with it:
// Run: func(cmd *cobra.Command, args []string) { },
}
// Execute adds all child commands to the root command and sets flags appropriately.
// This is called by main.main(). It only needs to happen once to the rootCmd.
func Execute() {
if err := rootCmd.Execute(); err != nil {
color.Warn.Println(err)
os.Exit(1)
}
}
func init() {
cobra.OnInitialize(initConfig)
// Here you will define your flags and configuration settings.
// Cobra supports persistent flags, which, if defined here,
// will be global for your application.
rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.gva.yaml)")
// Cobra also supports local flags, which will only run
// when this action is called directly.
rootCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
}
// initConfig reads in config file and ENV variables if set.
func initConfig() {
if cfgFile != "" {
// Use config file from the flag.
viper.SetConfigFile(cfgFile)
} else {
// Find home directory.
home, err := homedir.Dir()
if err != nil {
color.Warn.Println(err)
os.Exit(1)
}
// Search config in home directory with name ".gva" (without extension).
viper.AddConfigPath(home)
viper.SetConfigName(".gva")
}
viper.AutomaticEnv() // read in environment variables that match
// If a config file is found, read it in.
if err := viper.ReadInConfig(); err == nil {
color.Warn.Println("Using config file:", viper.ConfigFileUsed())
}
}
+53
View File
@@ -0,0 +1,53 @@
/*
Copyright © 2020 NAME HERE <EMAIL ADDRESS>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package gva
import (
"gin-vue-admin/utils"
"github.com/spf13/cobra"
"os"
)
// runCmd represents the run command
var runCmd = &cobra.Command{
Use: "run",
Short: "running go codes with hot-compiled-like feature",
Long: `
The "run" command is used for running go codes with hot-compiled-like feature,
which compiles and runs the go codes asynchronously when codes change.
`,
Run: func(cmd *cobra.Command, args []string) {
w := utils.NewWatch()
t := utils.NewT()
path, _ := os.Getwd()
go w.Watch(path, t)
t.RunTask()
},
}
func init() {
rootCmd.AddCommand(runCmd)
// Here you will define your flags and configuration settings.
// Cobra supports Persistent Flags which will work for this command
// and all subcommands, e.g.:
// runCmd.PersistentFlags().String("foo", "", "A help for foo")
// Cobra supports local flags which will only run when this command
// is called directly, e.g.:
// runCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
}
+36
View File
@@ -0,0 +1,36 @@
/*
Copyright © 2020 SliverHorn
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package gva
import (
"github.com/gookit/color"
"github.com/spf13/cobra"
)
// versionCmd represents the version command
var versionCmd = &cobra.Command{
Use: "version",
Short: "版本信息",
Long: `版本的长信息`,
Run: func(cmd *cobra.Command, args []string) {
color.Green.Println("v0.0.3")
},
}
func init() {
rootCmd.AddCommand(versionCmd)
}
+22
View File
@@ -0,0 +1,22 @@
/*
Copyright © 2020 SliverHorn
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package main
import "gin-vue-admin/cmd/gva"
func main() {
gva.Execute()
}
+62 -43
View File
@@ -1,58 +1,77 @@
# Gin-Vue-Admin Global Configuration
# casbin configuration
casbin:
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
# zap logger configuration
zap:
level: 'info'
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
#sqlite 配置
sqlite:
path: db.db
log-mode: true
config: 'loc=Asia/Shanghai'
# oss configuration
qiniu:
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
db: 0
addr: '127.0.0.1:6379'
password: ''
# email configuration
email:
to: 'xxx@qq.com'
port: 465
from: 'xxx@163.com'
host: 'smtp.163.com'
is-ssl: true
secret: 'xxx'
nickname: 'test'
# casbin configuration
casbin:
model-path: './resource/rbac_model.conf'
# 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
env: 'public' # Change to "develop" to skip authentication for development mode
addr: 8888
db-type: 'mysql'
oss-type: 'local'
use-multipoint: false
# captcha configuration
captcha:
key-long: 4
img-width: 120
img-height: 40
key-long: 6
img-width: 240
img-height: 80
# logger configuration
log:
prefix: '[GIN-VUE-ADMIN]'
log-file: true
stdout: 'DEBUG'
file: 'DEBUG'
# mysql connect configuration
mysql:
path: '127.0.0.1:3306'
config: 'charset=utf8mb4&parseTime=True&loc=Local'
db-name: 'qmPlus'
username: 'root'
password: 'Aa@6447985'
max-idle-conns: 10
max-open-conns: 100
log-mode: false
log-zap: false
# local configuration
local:
path: 'uploads/file'
# qiniu configuration (请自行七牛申请对应的 公钥 私钥 bucket �?域名地址)
qiniu:
zone: 'ZoneHuadong'
bucket: 'qm-plus-img'
img-path: 'http://qmplusimg.henrongyi.top'
use-https: false
access-key: '25j8dYBZ2wuiy0yhwShytjZDTX662b8xiFguwxzZ'
secret-key: 'pgdbqEsf7ooZh7W3xokP833h3dZ_VecFXPDeG5JY'
use-cdn-domains: false
+7
View File
@@ -0,0 +1,7 @@
package config
type Captcha struct {
KeyLong int `mapstructure:"key-long" json:"keyLong" yaml:"key-long"`
ImgWidth int `mapstructure:"img-width" json:"imgWidth" yaml:"img-width"`
ImgHeight int `mapstructure:"img-height" json:"imgHeight" yaml:"img-height"`
}
+5
View File
@@ -0,0 +1,5 @@
package config
type Casbin struct {
ModelPath string `mapstructure:"model-path" json:"modelPath" yaml:"model-path"`
}
+10 -66
View File
@@ -1,72 +1,16 @@
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"`
Zap Zap `mapstructure:"zap" json:"zap" yaml:"zap"`
Redis Redis `mapstructure:"redis" json:"redis" yaml:"redis"`
Email Email `mapstructure:"email" json:"email" yaml:"email"`
Casbin Casbin `mapstructure:"casbin" json:"casbin" yaml:"casbin"`
System System `mapstructure:"system" json:"system" yaml:"system"`
Captcha Captcha `mapstructure:"captcha" json:"captcha" yaml:"captcha"`
Log Log `mapstructure:"log" json:"log" yaml:"log"`
}
type System struct {
UseMultipoint bool `mapstructure:"use-multipoint" json:"useMultipoint" yaml:"use-multipoint"`
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"`
}
type JWT struct {
SigningKey string `mapstructure:"signing-key" json:"signingKey" yaml:"signing-key"`
}
type Casbin struct {
ModelPath string `mapstructure:"model-path" json:"modelPath" yaml:"model-path"`
}
type Mysql 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"`
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"`
LogMode bool `mapstructure:"log-mode" json:"logMode" yaml:"log-mode"`
}
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 Qiniu struct {
AccessKey string `mapstructure:"access-key" json:"accessKey" yaml:"access-key"`
SecretKey string `mapstructure:"secret-key" json:"secretKey" yaml:"secret-key"`
Bucket string `mapstructure:"bucket" json:"bucket" yaml:"bucket"`
ImgPath string `mapstructure:"img-path" json:"imgPath" yaml:"img-path"`
}
type Captcha struct {
KeyLong int `mapstructure:"key-long" json:"keyLong" yaml:"key-long"`
ImgWidth int `mapstructure:"img-width" json:"imgWidth" yaml:"img-width"`
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 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"`
// gorm
Mysql Mysql `mapstructure:"mysql" json:"mysql" yaml:"mysql"`
// oss
Local Local `mapstructure:"local" json:"local" yaml:"local"`
Qiniu Qiniu `mapstructure:"qiniu" json:"qiniu" yaml:"qiniu"`
}
+11
View File
@@ -0,0 +1,11 @@
package config
type Email struct {
To string `mapstructure:"to" json:"to" yaml:"to"`
Port int `mapstructure:"port" json:"port" yaml:"port"`
From string `mapstructure:"from" json:"from" yaml:"from"`
Host string `mapstructure:"host" json:"host" yaml:"host"`
IsSSL bool `mapstructure:"is-ssl" json:"isSSL" yaml:"is-ssl"`
Secret string `mapstructure:"secret" json:"secret" yaml:"secret"`
Nickname string `mapstructure:"nickname" json:"nickname" yaml:"nickname"`
}
+13
View File
@@ -0,0 +1,13 @@
package config
type Mysql struct {
Path string `mapstructure:"path" json:"path" yaml:"path"`
Config string `mapstructure:"config" json:"config" yaml:"config"`
Dbname string `mapstructure:"db-name" json:"dbname" yaml:"db-name"`
Username string `mapstructure:"username" json:"username" yaml:"username"`
Password string `mapstructure:"password" json:"password" yaml:"password"`
MaxIdleConns int `mapstructure:"max-idle-conns" json:"maxIdleConns" yaml:"max-idle-conns"`
MaxOpenConns int `mapstructure:"max-open-conns" json:"maxOpenConns" yaml:"max-open-conns"`
LogMode bool `mapstructure:"log-mode" json:"logMode" yaml:"log-mode"`
LogZap bool `mapstructure:"log-zap" json:"logZap" yaml:"log-zap"`
}
+5
View File
@@ -0,0 +1,5 @@
package config
type JWT struct {
SigningKey string `mapstructure:"signing-key" json:"signingKey" yaml:"signing-key"`
}
+15
View File
@@ -0,0 +1,15 @@
package config
type Local struct {
Path string `mapstructure:"path" json:"path" yaml:"path" `
}
type Qiniu struct {
Zone string `mapstructure:"zone" json:"zone" yaml:"zone"`
Bucket string `mapstructure:"bucket" json:"bucket" yaml:"bucket"`
ImgPath string `mapstructure:"img-path" json:"imgPath" yaml:"img-path"`
UseHTTPS bool `mapstructure:"use-https" json:"useHttps" yaml:"use-https"`
AccessKey string `mapstructure:"access-key" json:"accessKey" yaml:"access-key"`
SecretKey string `mapstructure:"secret-key" json:"secretKey" yaml:"secret-key"`
UseCdnDomains bool `mapstructure:"use-cdn-domains" json:"useCdnDomains" yaml:"use-cdn-domains"`
}
+7
View File
@@ -0,0 +1,7 @@
package config
type Redis struct {
DB int `mapstructure:"db" json:"db" yaml:"db"`
Addr string `mapstructure:"addr" json:"addr" yaml:"addr"`
Password string `mapstructure:"password" json:"password" yaml:"password"`
}
+9
View File
@@ -0,0 +1,9 @@
package config
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"`
OssType string `mapstructure:"oss-type" json:"ossType" yaml:"oss-type"`
UseMultipoint bool `mapstructure:"use-multipoint" json:"useMultipoint" yaml:"use-multipoint"`
}
+13
View File
@@ -0,0 +1,13 @@
package config
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"`
}
+19
View File
@@ -0,0 +1,19 @@
package constant
//定义clazz常量
const (
USER_TASK string = "userTask" // 审批节点
//SCRIPT_TASK string = "scriptTask" //脚本节点
//RECEIVE_TASK string = "receiveTask"
//MAIL_TASK string = "mailTask" //邮件节点
//TIMER_START string = "timerStart" // 定时节点
//MESSAGE_START string = "messageStart" // 消息节点
EXCLUSIVE_GATEWAY string = "exclusiveGateway" // 排他网关
INCLUSIVE_GATEWAY string = "inclusiveGateway" // 包容网关
PARELLEL_GATEWAY string = "parallelGateway" // 并行网关
FLOW string = "flow" // 连线
START string = "start" // 开始节点
END string = "end" // 结束节点
//PROCESS string = "process" // 基础节点
)
-31
View File
@@ -1,31 +0,0 @@
package core
import (
"fmt"
"gin-vue-admin/global"
"github.com/fsnotify/fsnotify"
"github.com/spf13/viper"
)
const defaultConfigFile = "config.yaml"
func init() {
v := viper.New()
v.SetConfigFile(defaultConfigFile)
err := v.ReadInConfig()
if err != nil {
panic(fmt.Errorf("Fatal error config file: %s \n", err))
}
v.WatchConfig()
v.OnConfigChange(func(e fsnotify.Event) {
fmt.Println("config file changed:", e.Name)
if err := v.Unmarshal(&global.GVA_CONFIG); err != nil {
fmt.Println(err)
}
})
if err := v.Unmarshal(&global.GVA_CONFIG); err != nil {
fmt.Println(err)
}
global.GVA_VP = v
}
-107
View File
@@ -1,107 +0,0 @@
package core
import (
"fmt"
"gin-vue-admin/config"
"gin-vue-admin/global"
"gin-vue-admin/utils"
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
backends = registerStdout(c, backends)
backends = registerFile(c, backends)
oplogging.SetBackend(backends...)
global.GVA_LOG = logger
}
func registerStdout(c config.Log, backends []oplogging.Backend) []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))
}
return backends
}
func registerFile(c config.Log, backends []oplogging.Backend) []oplogging.Backend {
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)
return backends
}
level, err := oplogging.LogLevel(c.File)
if err != nil {
fmt.Println(err)
}
backends = append(backends, createBackend(fileWriter, c, level))
}
return backends
}
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)
}
+15 -12
View File
@@ -4,33 +4,36 @@ import (
"fmt"
"gin-vue-admin/global"
"gin-vue-admin/initialize"
"net/http"
"go.uber.org/zap"
"time"
)
type server interface {
ListenAndServe() error
}
func RunWindowsServer() {
if global.GVA_CONFIG.System.UseMultipoint {
// 初始化redis服务
initialize.Redis()
}
initialize.InitWkMode()
Router := initialize.Routers()
Router.Static("/form-generator", "./resource/page")
address := fmt.Sprintf(":%d", global.GVA_CONFIG.System.Addr)
s := &http.Server{
Addr: address,
Handler: Router,
ReadTimeout: 10 * time.Second,
WriteTimeout: 10 * time.Second,
MaxHeaderBytes: 1 << 20,
}
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
fmt.Printf(`
欢迎使用 Gin-Vue-Admin
当前版本:V2.3.8
默认自动化文档地址:http://127.0.0.1%s/swagger/index.html
默认前端文件运行地址:http://127.0.0.1:8080
`, s.Addr)
global.GVA_LOG.Error(s.ListenAndServe())
如果项目让您获得了收益,希望您能请团队喝杯可乐:https://www.gin-vue-admin.com/docs/coffee
`, address)
global.GVA_LOG.Error(s.ListenAndServe().Error())
}
+17
View File
@@ -0,0 +1,17 @@
// +build !windows
package core
import (
"github.com/fvbock/endless"
"github.com/gin-gonic/gin"
"time"
)
func initServer(address string, router *gin.Engine) server {
s := endless.NewServer(address, router)
s.ReadHeaderTimeout = 10 * time.Millisecond
s.WriteTimeout = 10 * time.Second
s.MaxHeaderBytes = 1 << 20
return s
}
+19
View File
@@ -0,0 +1,19 @@
// +build windows
package core
import (
"github.com/gin-gonic/gin"
"net/http"
"time"
)
func initServer(address string, router *gin.Engine) server {
return &http.Server{
Addr: address,
Handler: router,
ReadTimeout: 10 * time.Second,
WriteTimeout: 10 * time.Second,
MaxHeaderBytes: 1 << 20,
}
}
+54
View File
@@ -0,0 +1,54 @@
package core
import (
"flag"
"fmt"
"gin-vue-admin/global"
_ "gin-vue-admin/packfile"
"gin-vue-admin/utils"
"github.com/fsnotify/fsnotify"
"github.com/spf13/viper"
"os"
)
func Viper(path ...string) *viper.Viper {
var config string
if len(path) == 0 {
flag.StringVar(&config, "c", "", "choose config file.")
flag.Parse()
if config == "" { // 优先级: 命令行 > 环境变量 > 默认值
if configEnv := os.Getenv(utils.ConfigEnv); configEnv == "" {
config = utils.ConfigFile
fmt.Printf("您正在使用config的默认值,config的路径为%v\n", utils.ConfigFile)
} else {
config = configEnv
fmt.Printf("您正在使用GVA_CONFIG环境变量,config的路径为%v\n", config)
}
} else {
fmt.Printf("您正在使用命令行的-c参数传递的值,config的路径为%v\n", config)
}
} else {
config = path[0]
fmt.Printf("您正在使用func Viper()传递的值,config的路径为%v\n", config)
}
v := viper.New()
v.SetConfigFile(config)
err := v.ReadInConfig()
if err != nil {
panic(fmt.Errorf("Fatal error config file: %s \n", err))
}
v.WatchConfig()
v.OnConfigChange(func(e fsnotify.Event) {
fmt.Println("config file changed:", e.Name)
if err := v.Unmarshal(&global.GVA_CONFIG); err != nil {
fmt.Println(err)
}
})
if err := v.Unmarshal(&global.GVA_CONFIG); err != nil {
fmt.Println(err)
}
return v
}
+102
View File
@@ -0,0 +1,102 @@
package core
import (
"fmt"
"gin-vue-admin/global"
"gin-vue-admin/utils"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
"os"
"time"
)
var level zapcore.Level
func Zap() (logger *zap.Logger) {
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
}
if level == zap.DebugLevel || level == zap.ErrorLevel {
logger = zap.New(getEncoderCore(), zap.AddStacktrace(level))
} else {
logger = zap.New(getEncoderCore())
}
if global.GVA_CONFIG.Zap.ShowLine {
logger = logger.WithOptions(zap.AddCaller())
}
return logger
}
// 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
default:
config.EncodeLevel = zapcore.LowercaseLevelEncoder
}
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) {
writer, err := utils.GetWriteSyncer() // 使用file-rotatelogs进行日志分割
if err != nil {
fmt.Printf("Get Write Syncer Failed err:%v", err.Error())
return
}
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.
-620
View File
@@ -1,620 +0,0 @@
/*
Navicat Premium Data Transfer
Source Server : pandora
Source Server Type : MySQL
Source Server Version : 50644
Source Host : localhost:3306
Source Schema : qmplus
Target Server Type : MySQL
Target Server Version : 50644
File Encoding : 65001
Date: 14/05/2020 14:04:34
*/
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/deleteUser', 'DELETE', '', '', '');
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/deleteUser', 'DELETE', '', '', '');
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/deleteUser', 'DELETE', '', '', '');
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', '/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', '', '', '');
-- ----------------------------
-- 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 utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`customer_phone_data` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`sys_user_id` int(10) UNSIGNED NULL DEFAULT NULL,
`sys_user_authority_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_exa_customers_deleted_at`(`deleted_at`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci 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');
INSERT INTO `exa_customers` VALUES (2, '2020-04-10 12:25:53', '2020-04-10 12:25:53', '2020-04-10 13:43:56', 'test', '123123123', 10, '888');
INSERT INTO `exa_customers` VALUES (3, '2020-04-10 13:44:12', '2020-04-10 13:44:12', '2020-04-10 13:44:13', '123123', '123123', 10, '888');
INSERT INTO `exa_customers` VALUES (4, '2020-04-10 13:47:10', '2020-04-10 13:47:10', '2020-04-10 13:47:12', '22222222', '222222222222222', 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,
`file_chunk_path` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`file_chunk_number` int(11) NULL DEFAULT NULL,
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,
`url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`tag` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`key` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
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,
`file_md5` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`file_path` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`chunk_total` int(11) NULL DEFAULT NULL,
`is_finish` tinyint(1) NULL DEFAULT NULL,
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 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,
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_jwt_blacklists_deleted_at`(`deleted_at`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 49 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Records of jwt_blacklists
-- ----------------------------
INSERT INTO `jwt_blacklists` VALUES (3, '2019-12-28 18:29:05', '2019-12-28 18:29:05', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4MTMzNzM2LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1Nzc1Mjc5MzZ9.T7ikGw-lgAAQlfMne7zPIF-PlfQMg37uBCYJ24Y_B38');
INSERT INTO `jwt_blacklists` VALUES (4, '2019-12-28 18:31:02', '2019-12-28 18:31:02', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4MTMzODUzLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1Nzc1MjgwNTN9.tDzUm4KNFeJCErNfZGfuF2tcuolga2f_2dE0nTl_UZU');
INSERT INTO `jwt_blacklists` VALUES (5, '2019-12-28 18:31:25', '2019-12-28 18:31:25', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4MTMzODcwLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1Nzc1MjgwNzB9.mspXy9sqQO_5PusPReLalodo_ybWRKxb3Ownf2r2HxE');
INSERT INTO `jwt_blacklists` VALUES (6, '2019-12-30 14:20:10', '2019-12-30 14:20:10', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4MjkxNTc2LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1Nzc2ODU3NzZ9.AR2KYShboFKsHTjwohxEkA3lytttfZqRH849sl2fNdw');
INSERT INTO `jwt_blacklists` VALUES (7, '2019-12-30 14:21:14', '2019-12-30 14:21:14', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4MjkxNjE2LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1Nzc2ODU4MTZ9.h8zbDVHM_QbBI-ejGXeQpw0S9oYHJyP4U-TwsVFus9Q');
INSERT INTO `jwt_blacklists` VALUES (8, '2019-12-30 14:21:57', '2019-12-30 14:21:57', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4MjkxNjgxLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1Nzc2ODU4ODF9.CSjolDGVpU0g7YG6TaPAlWAMdhtvnBhAi-XYYWZ6RLo');
INSERT INTO `jwt_blacklists` VALUES (9, '2019-12-30 14:25:01', '2019-12-30 14:25:01', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4MjkxODIyLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1Nzc2ODYwMjJ9.Y_s22Vh5J2ah6Kh1nZQQ8XIQspbT4I7tzc_YJqWrRWM');
INSERT INTO `jwt_blacklists` VALUES (10, '2019-12-30 14:29:26', '2019-12-30 14:29:26', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4MjkyMTU0LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1Nzc2ODYzNTR9.4HJdx-sfYE5TUUefdwi3yZ6dY_jG7WwEC_55WuGawY8');
INSERT INTO `jwt_blacklists` VALUES (11, '2019-12-30 14:43:43', '2019-12-30 14:43:43', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4MjkyMTcwLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1Nzc2ODYzNzB9.YEhupQVwjMVBB2eAcAoGG-vJczoxuUyn6KR-tDWU86I');
INSERT INTO `jwt_blacklists` VALUES (12, '2019-12-30 14:55:13', '2019-12-30 14:55:13', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4MjkzMDI3LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1Nzc2ODcyMjd9.r_sE_Z31cFdS2nCf3iyQjuiZe0Z3HPR07wKBGlUHsnk');
INSERT INTO `jwt_blacklists` VALUES (13, '2019-12-30 14:58:31', '2019-12-30 14:58:31', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4MjkzNzY2LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1Nzc2ODc5NjZ9.dYFlmyIKQZjzTCKu56wCmxXiW6zOayN_YgygCcvCyLk');
INSERT INTO `jwt_blacklists` VALUES (14, '2019-12-30 14:58:38', '2019-12-30 14:58:38', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4MjkzOTEwLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1Nzc2ODgxMTB9.pPmzsHU4UceZuPFT_G-SDdxe6FD3MuL47HkovpI-_0c');
INSERT INTO `jwt_blacklists` VALUES (15, '2019-12-30 14:58:58', '2019-12-30 14:58:58', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4MjkzOTE4LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1Nzc2ODgxMTh9.irf98R0belbXtb8x9SxsvuhiYsbHMPbHbFDxaaH0z6Q');
INSERT INTO `jwt_blacklists` VALUES (16, '2020-01-06 16:32:31', '2020-01-06 16:32:31', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTAzMjk5LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTc0OTl9.jgLfjvek7sQyuZ2TABQvLOyu_ifNw_KYzfY3VTLL4fw');
INSERT INTO `jwt_blacklists` VALUES (17, '2020-01-06 16:33:08', '2020-01-06 16:33:08', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA0MzU4LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTg1NTh9.89r6xHZUBDjfmNpmF02RjQXYTBGUiJvOEDP8pydNt-A');
INSERT INTO `jwt_blacklists` VALUES (18, '2020-01-06 16:33:18', '2020-01-06 16:33:18', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA0MzkyLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTg1OTJ9.6Yv9ZYhN-TH9H4SoZEAkjevKVX0vLHL1lVQGFpfBr2U');
INSERT INTO `jwt_blacklists` VALUES (19, '2020-01-06 16:36:06', '2020-01-06 16:36:06', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA0NDA5LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTg2MDl9._9zRRK76XH_KgrW1X9P5GTLW9dwfIixB4QUsC7M3RHA');
INSERT INTO `jwt_blacklists` VALUES (20, '2020-01-06 16:44:06', '2020-01-06 16:44:06', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA0NTcxLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTg3NzF9.5ki0TZooCorK81xWpYa-OO3RR-Bpp5am_uNCNPh4250');
INSERT INTO `jwt_blacklists` VALUES (21, '2020-01-06 16:45:50', '2020-01-06 16:45:50', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA1MDUwLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTkyNTB9.A0n5faE0X0TyRb_1RvAQBLooY-peapPTD0LnJD03Ul0');
INSERT INTO `jwt_blacklists` VALUES (22, '2020-01-06 16:46:24', '2020-01-06 16:46:24', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA1MTU0LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTkzNTR9.VtqTOJ-MQY2K3w4tM7HgT0z73CEOd3CDqmYqKCjXxnc');
INSERT INTO `jwt_blacklists` VALUES (23, '2020-01-06 16:47:20', '2020-01-06 16:47:20', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA1MTg3LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTkzODd9.fwL1QakF30SHSaGDkPo3weIg0l7kiAGwNq_fKsFxquc');
INSERT INTO `jwt_blacklists` VALUES (24, '2020-01-06 16:47:57', '2020-01-06 16:47:57', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA1MjQ0LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTk0NDR9.VoKdA0-brmUlQ5bYufIdMWrS-cCQ2ARm7_jeVtfvCpc');
INSERT INTO `jwt_blacklists` VALUES (25, '2020-01-06 16:49:08', '2020-01-06 16:49:08', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA1Mjg1LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTk0ODV9.a8-zmyIlJJGdonhXAzNvNH9C-nMa-Voq4bhTbiVKJzE');
INSERT INTO `jwt_blacklists` VALUES (26, '2020-01-06 16:49:32', '2020-01-06 16:49:32', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA1MzUyLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTk1NTJ9.l4e3rjtrDgRsqnQwizJ-ZXVUVM8ywSJcNJkkEVYbdzU');
INSERT INTO `jwt_blacklists` VALUES (27, '2020-01-06 16:49:58', '2020-01-06 16:49:58', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA1Mzc3LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTk1Nzd9.mXUPYvmXbntrdywpBNM0j9sP991cwfhc9b0KvUM4dG4');
INSERT INTO `jwt_blacklists` VALUES (28, '2020-01-06 16:50:56', '2020-01-06 16:50:56', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA1NDExLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTk2MTF9.Z21e8nWHKV5XvYg61CZCz3nMK25m_FmlxncxGMpMS0k');
INSERT INTO `jwt_blacklists` VALUES (29, '2020-01-06 16:52:03', '2020-01-06 16:52:03', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA1NDY0LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTk2NjR9.qzptIyCcL_SPm6TGwXML8Rih3qYqj9GLUpWzTpSPPuI');
INSERT INTO `jwt_blacklists` VALUES (30, '2020-01-06 16:52:36', '2020-01-06 16:52:36', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA1NTI3LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTk3Mjd9.D9e8qbx44CLX0ZInwNlIqTGS_sSE069TRIDkQAk7tVY');
INSERT INTO `jwt_blacklists` VALUES (31, '2020-01-06 16:54:35', '2020-01-06 16:54:35', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA1NTY1LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTk3NjV9.D4EZmVAJ96kxcyIfWkT_LA81t1JCuQZcYmQkkoNhtPo');
INSERT INTO `jwt_blacklists` VALUES (32, '2020-01-06 16:55:40', '2020-01-06 16:55:40', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA1NjgzLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTk4ODN9.SJL2fFMbe5VL2YWBzMlrhxbBIJhIHTUeodkEpgH1Xgo');
INSERT INTO `jwt_blacklists` VALUES (33, '2020-01-06 16:57:28', '2020-01-06 16:57:28', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA1NzU4LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgyOTk5NTh9.6y12UkOeW7vz7gGTcYaN3Y-2Ut2QmjgU9WEuy_pneGM');
INSERT INTO `jwt_blacklists` VALUES (34, '2020-01-06 16:59:02', '2020-01-06 16:59:02', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA1ODU1LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgzMDAwNTV9.G0q9X7Ld3cN_BO-K219b7tFAHgtpiAwqLPoxVNKsEl8');
INSERT INTO `jwt_blacklists` VALUES (35, '2020-01-06 16:59:26', '2020-01-06 16:59:26', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTc4OTA1OTQ2LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1NzgzMDAxNDZ9.cmBgWiztsnh7zF3OUNIDQKv8wzGJF7fllUv-4LlYxu8');
INSERT INTO `jwt_blacklists` VALUES (36, '2020-03-21 14:46:14', '2020-03-21 14:46:14', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTg1Mzc3ODY3LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1ODQ3NzIwNjd9.DLhWhD1FdcWLyFLcXQynKJnenbVHrSiKhlDGFRzgo5k');
INSERT INTO `jwt_blacklists` VALUES (37, '2020-03-31 14:24:35', '2020-03-31 14:24:35', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTg2MTM4MTA4LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1ODU1MzIzMDh9.Ro2F2dZLfOk2Z_OPRbweOuCpchr6HlHfQIF5qjfc8y4');
INSERT INTO `jwt_blacklists` VALUES (38, '2020-04-01 16:07:57', '2020-04-01 16:07:57', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTg2MjQwNzQyLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1ODU2MzQ5NDJ9.9qaOFu7D5cq4vxTfLi4pyO_JGcKjVAEJIcoStJWJlYg');
INSERT INTO `jwt_blacklists` VALUES (39, '2020-04-15 16:30:41', '2020-04-15 16:30:41', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTg3MDk1Njg5LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1ODY0ODk4ODl9.-cNmRAyqhylZlzakwoFY08x7RnjI3CiWTiQc_Iabb-c');
INSERT INTO `jwt_blacklists` VALUES (40, '2020-04-15 16:39:26', '2020-04-15 16:39:26', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTg3NTQ0MjUwLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1ODY5Mzg0NTB9.smVP-Rl1EkAuUVqXW7z0mpxA5O86vXj0oH4FukG-NVA');
INSERT INTO `jwt_blacklists` VALUES (41, '2020-04-15 17:08:06', '2020-04-15 17:08:06', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTg3NTQ0NzgxLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1ODY5Mzg5ODF9.OMZ08Y8aPuj40-NGEQ402LyRFBpkLWzzaqD3_tvj1h8');
INSERT INTO `jwt_blacklists` VALUES (42, '2020-04-15 17:08:28', '2020-04-15 17:08:28', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTg3NTQ2NDk0LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1ODY5NDA2OTR9.9lsoTbZrwhZ8kMXiH-Ta3A4h_yp7SwLj57mo_u5mrk4');
INSERT INTO `jwt_blacklists` VALUES (43, '2020-04-15 17:10:24', '2020-04-15 17:10:24', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTg3NTQ2NTE1LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1ODY5NDA3MTV9.5SrUrUmd4YhzlGmSpA9xJW_wbjV6yI6ty_NriIceOQo');
INSERT INTO `jwt_blacklists` VALUES (44, '2020-04-15 17:11:43', '2020-04-15 17:11:43', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTg3NTQ2NjI5LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1ODY5NDA4Mjl9.SFiomEpOshboOe0JGDa1HlJt5aQIF7IeyOsoDwl1o8E');
INSERT INTO `jwt_blacklists` VALUES (45, '2020-04-15 17:12:54', '2020-04-15 17:12:54', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTg3NTQ2NzE4LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1ODY5NDA5MTh9.xrwEknZQN2J3poarMTQvb7mX1Icicz2_f60kw36g9og');
INSERT INTO `jwt_blacklists` VALUES (46, '2020-04-15 17:14:47', '2020-04-15 17:14:47', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTg3NTQ2Nzg5LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1ODY5NDA5ODl9.3jbdl1N0KA8ExFMWXHi3ha4aESKq8yDKDgpSH4Xdsnk');
INSERT INTO `jwt_blacklists` VALUES (47, '2020-04-22 12:04:20', '2020-04-22 12:04:20', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTg3NjE2MTYwLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1ODcwMTAzNjB9.jRHlnfXuJhp4hBE-QqCZ-lodzwK67IBkDI2xteB0OQw');
INSERT INTO `jwt_blacklists` VALUES (48, '2020-04-22 12:12:17', '2020-04-22 12:12:17', NULL, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiY2UwZDY2ODUtYzE1Zi00MTI2LWE1YjQtODkwYmM5ZDIzNTZkIiwiSUQiOjEwLCJOaWNrTmFtZSI6Iui2hee6p-euoeeQhuWRmCIsIkF1dGhvcml0eUlkIjoiODg4IiwiZXhwIjoxNTg4MTMzMjQyLCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE1ODc1Mjc0NDJ9.WJ59uRUxXJ7-rUH07mE6jCfnwgfvQnpPaLU5vJ_VhWM');
-- ----------------------------
-- 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,
`path` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`description` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`api_group` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`method` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'POST',
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 = 48 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-09 17:43:15', 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', '2020-05-06 16:03:47', NULL, NULL, '/user/deleteUser', '删除用户', 'user', 'DELETE');
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');
-- ----------------------------
-- 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,
`authority_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`parent_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`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-05-09 17:41:29', NULL);
INSERT INTO `sys_authorities` VALUES ('8881', '普通用户子角色', '888', '2020-04-04 11:44:56', '2020-05-09 17:41:29', NULL);
INSERT INTO `sys_authorities` VALUES ('9528', '测试角色', '0', '2020-04-04 11:44:56', '2020-05-09 17:41:29', 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,
`sys_base_menu_id` int(10) UNSIGNED NOT NULL DEFAULT 0,
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', 45);
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_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,
`parent_id` int(10) UNSIGNED NULL DEFAULT NULL,
`path` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`hidden` tinyint(1) NULL DEFAULT NULL,
`component` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`title` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`icon` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`nick_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`sort` int(255) NULL DEFAULT NULL,
`keep_alive` tinyint(1) NULL DEFAULT NULL,
`default_menu` tinyint(1) NULL DEFAULT NULL,
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 = 47 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-09 17:41:51', 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-05-09 17:41:29', 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-05-09 17:41:29', 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-09 17:41:29', 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-05-09 17:41:29', 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-05-09 17:41:29', 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-05-09 17:41:29', 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-09 17:41:29', NULL, 0, 0, 'person', 'person', 1, 'view/person/person.vue', '个人信息', 'user-solid', '个人信息', 4, 0, 0);
INSERT INTO `sys_base_menus` VALUES (19, '2019-10-20 11:14:42', '2020-05-09 17:41:29', 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-05-09 17:41:29', 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-05-09 17:41:29', 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-05-09 17:41:29', 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-05-09 17:41:29', 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-05-09 17:41:29', 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-05-09 17:41:29', 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-05-09 17:41:29', 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-05-09 17:41:29', 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-09 17:41:29', NULL, 0, 38, 'autoCode', 'autoCode', 0, 'view/systemTools/autoCode/index.vue', '代码生成器', 'cpu', '代码生成器', 1, 0, 0);
INSERT INTO `sys_base_menus` VALUES (41, '2020-03-29 21:36:26', '2020-05-09 17:41:29', NULL, 0, 38, 'formCreate', 'formCreate', 0, 'view/systemTools/formCreate/index.vue', '表单生成器', 'magic-stick', '表单生成器', 2, 0, 0);
INSERT INTO `sys_base_menus` VALUES (42, '2020-04-02 14:19:36', '2020-05-09 17:41:29', 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-05-09 17:42:23', NULL, 0, 0, 'iconList', 'iconList', 0, 'view/iconList/index.vue', '图标集合', 'star-on', NULL, 2, 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,
`data_authority_id` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
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 ('88822', '888');
INSERT INTO `sys_data_authority_id` VALUES ('88822', '8881');
INSERT INTO `sys_data_authority_id` VALUES ('88822', '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_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,
`user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`pass_word` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`nick_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'QMPlusUser',
`header_img` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'http://www.henrongyi.top/avatar/lufu.jpg',
`authority_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '888',
`authority_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`username` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`password` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`phone_data` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`manager` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
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 = 13 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-05-06 16:09:15', NULL, 0x63653064363638352D633135662D343132362D613562342D383930626339643233353664, NULL, NULL, '超级管理员', 'http://qmplusimg.henrongyi.top/15887525450B978439-F04A-4a09-A8D3-DE7DE2677142.png', '888', NULL, 'admin', 'e10adc3949ba59abbe56e057f20f883e', NULL, NULL);
INSERT INTO `sys_users` VALUES (11, '2019-09-13 17:27:29', '2020-05-09 17:43:44', NULL, 0x66643665663739622D393434632D343838382D383337372D616265326432363038383538, NULL, NULL, 'QMPlusUser', 'http://qmplusimg.henrongyi.top/1572075907logo.png', '9528', NULL, 'a303176530', '3ec063004a6f31642261936a379fde3d', NULL, NULL);
-- ----------------------------
-- 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,
`is_strat` tinyint(1) NULL DEFAULT NULL,
`step_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`step_no` double NULL DEFAULT NULL,
`step_authority_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`is_end` tinyint(1) NULL DEFAULT NULL,
`sys_workflow_id` int(10) UNSIGNED NULL DEFAULT NULL,
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` timestamp(0) NULL DEFAULT NULL,
`updated_at` timestamp(0) NULL DEFAULT NULL,
`deleted_at` timestamp(0) NULL DEFAULT NULL,
`workflow_nick_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`workflow_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`workflow_description` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_workflows_deleted_at`(`deleted_at`) USING BTREE,
INDEX `idx_sys_workflows_deleted_at`(`deleted_at`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Records of sys_workflows
-- ----------------------------
INSERT INTO `sys_workflows` VALUES (8, '2019-12-09 15:20:21', '2019-12-09 15:20:21', NULL, '测试改版1', 'test', '123123');
-- ----------------------------
-- View structure for authority_menu
-- ----------------------------
DROP VIEW IF EXISTS `authority_menu`;
CREATE ALGORITHM = UNDEFINED DEFINER = `root`@`localhost` 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)
);
+1377 -337
View File
File diff suppressed because it is too large Load Diff
+1376 -335
View File
File diff suppressed because it is too large Load Diff
+904 -271
View File
File diff suppressed because it is too large Load Diff
+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
View File
@@ -0,0 +1,13 @@
package global
import (
"gorm.io/gorm"
"time"
)
type GVA_MODEL struct {
ID uint `gorm:"primarykey"`
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
}
+32 -22
View File
@@ -1,50 +1,60 @@
module gin-vue-admin
go 1.12
go 1.14
require (
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect
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/dchest/captcha v0.0.0-20170622155422-6a29415a8364
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
github.com/gin-gonic/gin v1.6.1
github.com/fvbock/endless v0.0.0-20170109170031-447134032cb6
github.com/gin-gonic/gin v1.6.3
github.com/go-ole/go-ole v1.2.4 // indirect
github.com/go-openapi/spec v0.19.7 // indirect
github.com/go-openapi/swag v0.19.8 // indirect
github.com/go-playground/validator/v10 v10.3.0 // indirect
github.com/go-redis/redis v6.15.7+incompatible
github.com/go-sql-driver/mysql v1.5.0 // indirect
github.com/golang/protobuf v1.3.5 // indirect
github.com/go-sql-driver/mysql v1.5.0
github.com/golang/protobuf v1.4.2 // indirect
github.com/gookit/color v1.3.1
github.com/jehiah/go-strftime v0.0.0-20171201141054-1d33003b3869 // indirect
github.com/jinzhu/gorm v1.9.12
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/jordan-wright/email v0.0.0-20200824153738-3f5bafa1cd84
github.com/json-iterator/go v1.1.10 // 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/go-homedir v1.1.0
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/pkg/errors v0.9.1 // indirect
github.com/qiniu/api.v7 v7.2.5+incompatible
github.com/qiniu/x v7.0.8+incompatible // indirect
github.com/pkg/errors v0.9.1
github.com/qiniu/api.v7/v7 v7.4.1
github.com/satori/go.uuid v1.2.0
github.com/shirou/gopsutil v2.20.8+incompatible
github.com/spf13/afero v1.2.2 // indirect
github.com/spf13/cast v1.3.1 // indirect
github.com/spf13/cobra v1.1.1
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.6.2
github.com/spf13/viper v1.7.0
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
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd // 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
qiniupkg.com/x v7.0.8+incompatible // indirect
gopkg.in/yaml.v2 v2.3.0 // indirect
gorm.io/driver/mysql v0.3.0
gorm.io/gorm v1.20.5
)
replace github.com/casbin/gorm-adapter/v3 => github.com/casbin/gorm-adapter/v3 v3.0.2
+12
View File
@@ -0,0 +1,12 @@
@echo ##########Formatting code#########################################
go fmt ./ && go vet ./
@echo ##########Format the code successfully############################
@echo ##########Compiling gva.exe#######################################
go build -o gva.exe cmd/main.go
@echo ##########Successfully compiled gva.exe###########################
@echo ##########Initializing data using gva.exe#########################
gva.exe initdb
@echo ##########Use gva.exe to initialize data successfully#############
@echo ##########Deleting gva.exe########################################
del gva.exe
@echo ##########Deleting gva.exe successfully###########################

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