模块化变更
This commit is contained in:
@@ -3,7 +3,8 @@ package initialize
|
||||
import (
|
||||
"gin-vue-admin/global"
|
||||
"gin-vue-admin/initialize/internal"
|
||||
"gin-vue-admin/model"
|
||||
"gin-vue-admin/model/example"
|
||||
"gin-vue-admin/model/system"
|
||||
"os"
|
||||
|
||||
"go.uber.org/zap"
|
||||
@@ -34,21 +35,21 @@ func Gorm() *gorm.DB {
|
||||
|
||||
func MysqlTables(db *gorm.DB) {
|
||||
err := db.AutoMigrate(
|
||||
model.SysUser{},
|
||||
model.SysAuthority{},
|
||||
model.SysApi{},
|
||||
model.SysBaseMenu{},
|
||||
model.SysBaseMenuParameter{},
|
||||
model.JwtBlacklist{},
|
||||
model.SysDictionary{},
|
||||
model.SysDictionaryDetail{},
|
||||
model.ExaFileUploadAndDownload{},
|
||||
model.ExaFile{},
|
||||
model.ExaFileChunk{},
|
||||
model.ExaSimpleUploader{},
|
||||
model.ExaCustomer{},
|
||||
model.SysOperationRecord{},
|
||||
model.SysAutoCodeHistory{},
|
||||
system.SysUser{},
|
||||
system.SysAuthority{},
|
||||
system.SysApi{},
|
||||
system.SysBaseMenu{},
|
||||
system.SysBaseMenuParameter{},
|
||||
system.JwtBlacklist{},
|
||||
system.SysDictionary{},
|
||||
system.SysDictionaryDetail{},
|
||||
example.ExaFileUploadAndDownload{},
|
||||
example.ExaFile{},
|
||||
example.ExaFileChunk{},
|
||||
example.ExaSimpleUploader{},
|
||||
example.ExaCustomer{},
|
||||
system.SysOperationRecord{},
|
||||
system.SysAutoCodeHistory{},
|
||||
// Code generated by gin-vue-admin Begin; DO NOT EDIT.
|
||||
// Code generated by gin-vue-admin End; DO NOT EDIT.
|
||||
)
|
||||
|
@@ -27,28 +27,28 @@ func Routers() *gin.Engine {
|
||||
// 方便统一添加路由组前缀 多服务器上线使用
|
||||
PublicGroup := Router.Group("")
|
||||
{
|
||||
router.InitBaseRouter(PublicGroup) // 注册基础功能路由 不做鉴权
|
||||
router.InitInitRouter(PublicGroup) // 自动初始化相关
|
||||
router.RouterApp.System.InitBaseRouter(PublicGroup) // 注册基础功能路由 不做鉴权
|
||||
router.RouterApp.System.InitInitRouter(PublicGroup) // 自动初始化相关
|
||||
}
|
||||
PrivateGroup := Router.Group("")
|
||||
PrivateGroup.Use(middleware.JWTAuth()).Use(middleware.CasbinHandler())
|
||||
{
|
||||
router.InitApiRouter(PrivateGroup) // 注册功能api路由
|
||||
router.InitJwtRouter(PrivateGroup) // jwt相关路由
|
||||
router.InitUserRouter(PrivateGroup) // 注册用户路由
|
||||
router.InitMenuRouter(PrivateGroup) // 注册menu路由
|
||||
router.InitEmailRouter(PrivateGroup) // 邮件相关路由
|
||||
router.InitSystemRouter(PrivateGroup) // system相关路由
|
||||
router.InitCasbinRouter(PrivateGroup) // 权限相关路由
|
||||
router.InitCustomerRouter(PrivateGroup) // 客户路由
|
||||
router.InitAutoCodeRouter(PrivateGroup) // 创建自动化代码
|
||||
router.InitAuthorityRouter(PrivateGroup) // 注册角色路由
|
||||
router.InitSimpleUploaderRouter(PrivateGroup) // 断点续传(插件版)
|
||||
router.InitSysDictionaryRouter(PrivateGroup) // 字典管理
|
||||
router.InitSysOperationRecordRouter(PrivateGroup) // 操作记录
|
||||
router.InitSysDictionaryDetailRouter(PrivateGroup) // 字典详情管理
|
||||
router.InitFileUploadAndDownloadRouter(PrivateGroup) // 文件上传下载功能路由
|
||||
router.InitExcelRouter(PrivateGroup) // 表格导入导出
|
||||
router.RouterApp.System.InitApiRouter(PrivateGroup) // 注册功能api路由
|
||||
router.RouterApp.System.InitJwtRouter(PrivateGroup) // jwt相关路由
|
||||
router.RouterApp.System.InitUserRouter(PrivateGroup) // 注册用户路由
|
||||
router.RouterApp.System.InitMenuRouter(PrivateGroup) // 注册menu路由
|
||||
router.RouterApp.System.InitEmailRouter(PrivateGroup) // 邮件相关路由
|
||||
router.RouterApp.System.InitSystemRouter(PrivateGroup) // system相关路由
|
||||
router.RouterApp.System.InitCasbinRouter(PrivateGroup) // 权限相关路由
|
||||
router.RouterApp.Example.InitCustomerRouter(PrivateGroup) // 客户路由
|
||||
router.RouterApp.System.InitAutoCodeRouter(PrivateGroup) // 创建自动化代码
|
||||
router.RouterApp.System.InitAuthorityRouter(PrivateGroup) // 注册角色路由
|
||||
router.RouterApp.Example.InitSimpleUploaderRouter(PrivateGroup) // 断点续传(插件版)
|
||||
router.RouterApp.System.InitSysDictionaryRouter(PrivateGroup) // 字典管理
|
||||
router.RouterApp.System.InitSysOperationRecordRouter(PrivateGroup) // 操作记录
|
||||
router.RouterApp.System.InitSysDictionaryDetailRouter(PrivateGroup) // 字典详情管理
|
||||
router.RouterApp.Example.InitFileUploadAndDownloadRouter(PrivateGroup) // 文件上传下载功能路由
|
||||
router.RouterApp.Example.InitExcelRouter(PrivateGroup) // 表格导入导出
|
||||
|
||||
// Code generated by gin-vue-admin Begin; DO NOT EDIT.
|
||||
// Code generated by gin-vue-admin End; DO NOT EDIT.
|
||||
|
Reference in New Issue
Block a user