feat: 代码生成
This commit is contained in:
@@ -5,6 +5,8 @@ import (
|
||||
"sundynix-go/global"
|
||||
"sundynix-go/model/system"
|
||||
|
||||
"sundynix-go/model/order"
|
||||
|
||||
"go.uber.org/zap"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
@@ -37,6 +39,12 @@ func MigrateTable() {
|
||||
system.Menu{},
|
||||
system.SysOperationRecord{},
|
||||
system.Oss{},
|
||||
|
||||
order.Order{},
|
||||
|
||||
order.Refund{},
|
||||
|
||||
order.Stock{},
|
||||
)
|
||||
if err != nil {
|
||||
global.Logger.Error("Migrate table failed,err:", zap.Error(err))
|
||||
|
||||
+12
-4
@@ -26,6 +26,9 @@ func Routers() {
|
||||
|
||||
// 系统组路由
|
||||
systemRouter := router.GroupApp.System
|
||||
codegenRouter := router.GroupApp.Codegen
|
||||
|
||||
orderRouter := router.GroupApp.Order
|
||||
|
||||
NeedAuthGroup := Router.Group(global.Config.System.RouterPrefix)
|
||||
PublicGroup := Router.Group(global.Config.System.RouterPrefix)
|
||||
@@ -40,10 +43,15 @@ func Routers() {
|
||||
|
||||
{
|
||||
//需要鉴权的路由
|
||||
systemRouter.InitUserRouter(NeedAuthGroup) //用户相关
|
||||
systemRouter.InitClientRouter(NeedAuthGroup) //客户端相关
|
||||
systemRouter.InitRoleRouter(NeedAuthGroup) //角色相关
|
||||
systemRouter.InitMenuRouter(NeedAuthGroup) //菜单相关
|
||||
systemRouter.InitUserRouter(NeedAuthGroup) //用户相关
|
||||
systemRouter.InitClientRouter(NeedAuthGroup) //客户端相关
|
||||
systemRouter.InitRoleRouter(NeedAuthGroup) //角色相关
|
||||
systemRouter.InitMenuRouter(NeedAuthGroup) //菜单相关
|
||||
codegenRouter.InitCodegenRouter(NeedAuthGroup) //代码生成
|
||||
orderRouter.InitOrderRouter(NeedAuthGroup)
|
||||
orderRouter.InitRefundRouter(NeedAuthGroup)
|
||||
orderRouter.InitStockRouter(NeedAuthGroup)
|
||||
|
||||
}
|
||||
|
||||
address := fmt.Sprintf(":%d", global.Config.System.Addr)
|
||||
|
||||
Reference in New Issue
Block a user