mirror of
https://github.com/go-admin-team/go-admin.git
synced 2026-09-21 10:13:01 +00:00
Merge branch 'dev' of https://github.com/go-admin-team/go-admin into dev
This commit is contained in:
@@ -30,28 +30,6 @@ type SysMenu struct {
|
||||
models.ModelTime
|
||||
}
|
||||
|
||||
//type SysMenus struct {
|
||||
// MenuId int `json:"menuId" gorm:"column:menu_id;primaryKey;autoIncrement;"`
|
||||
// MenuName string `json:"menuName" gorm:"column:menu_name"`
|
||||
// Title string `json:"title" gorm:"column:title"`
|
||||
// Icon string `json:"icon" gorm:"column:icon"`
|
||||
// Path string `json:"path" gorm:"column:path"`
|
||||
// MenuType string `json:"menuType" gorm:"column:menu_type"`
|
||||
// Action string `json:"action" gorm:"column:action"`
|
||||
// Permission string `json:"permission" gorm:"column:permission"`
|
||||
// ParentId int `json:"parentId" gorm:"column:parent_id"`
|
||||
// NoCache bool `json:"noCache" gorm:"column:no_cache"`
|
||||
// Breadcrumb string `json:"breadcrumb" gorm:"column:breadcrumb"`
|
||||
// Component string `json:"component" gorm:"column:component"`
|
||||
// Sort int `json:"sort" gorm:"column:sort"`
|
||||
// Visible string `json:"visible" gorm:"column:visible"`
|
||||
// Children []SysMenu `json:"children" gorm:"-"`
|
||||
// models.ControlBy
|
||||
// models.ModelTime
|
||||
// DataScope string `json:"dataScope" gorm:"-"`
|
||||
// Params string `json:"params" gorm:"-"`
|
||||
//}
|
||||
|
||||
func (SysMenu) TableName() string {
|
||||
return "sys_menu"
|
||||
}
|
||||
@@ -63,4 +41,4 @@ func (e *SysMenu) Generate() models.ActiveRecord {
|
||||
|
||||
func (e *SysMenu) GetId() interface{} {
|
||||
return e.MenuId
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@ type SysPost struct {
|
||||
PostId int `gorm:"primaryKey;autoIncrement" json:"postId"` //岗位编号
|
||||
PostName string `gorm:"size:128;" json:"postName"` //岗位名称
|
||||
PostCode string `gorm:"size:128;" json:"postCode"` //岗位代码
|
||||
Sort int `gorm:"" json:"sort"` //岗位排序
|
||||
Sort int `gorm:"size:4;" json:"sort"` //岗位排序
|
||||
Status int `gorm:"size:4;" json:"status"` //状态
|
||||
Remark string `gorm:"size:255;" json:"remark"` //描述
|
||||
models.ControlBy
|
||||
@@ -27,4 +27,4 @@ func (e *SysPost) Generate() models.ActiveRecord {
|
||||
|
||||
func (e *SysPost) GetId() interface{} {
|
||||
return e.PostId
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
log "github.com/go-admin-team/go-admin-core/logger"
|
||||
"github.com/go-admin-team/go-admin-core/sdk"
|
||||
"github.com/go-admin-team/go-admin-core/sdk/middleware"
|
||||
common "go-admin/common/middleware"
|
||||
)
|
||||
|
||||
@@ -25,6 +26,8 @@ func InitRouter() {
|
||||
os.Exit(-1)
|
||||
}
|
||||
|
||||
r.Use(middleware.Metrics())
|
||||
|
||||
//r.Use(common.Sentinel()).
|
||||
// Use(common.RequestId(pkg.TrafficKey))
|
||||
common.InitMiddleware(r)
|
||||
|
||||
Reference in New Issue
Block a user