30 lines
1.2 KiB
Go
30 lines
1.2 KiB
Go
package router
|
|
|
|
import (
|
|
"kra/app/system/internal/transport/handler"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
func RegisterDictionary(group *gin.RouterGroup, h *handler.Dictionary) {
|
|
dictionaries := group.Group("/sysDictionary")
|
|
dictionaries.POST("/createSysDictionary", h.Create)
|
|
dictionaries.PUT("/updateSysDictionary", h.Update)
|
|
dictionaries.DELETE("/deleteSysDictionary", h.Delete)
|
|
dictionaries.GET("/findSysDictionary", h.Find)
|
|
dictionaries.GET("/getSysDictionaryList", h.List(false))
|
|
dictionaries.GET("/getSysDictionaryListWithDetails", h.List(true))
|
|
dictionaries.GET("/exportSysDictionary", h.Export)
|
|
dictionaries.POST("/importSysDictionary", h.Import)
|
|
details := group.Group("/sysDictionaryDetail")
|
|
details.POST("/createSysDictionaryDetail", h.CreateDetail)
|
|
details.PUT("/updateSysDictionaryDetail", h.UpdateDetail)
|
|
details.DELETE("/deleteSysDictionaryDetail", h.DeleteDetail)
|
|
details.GET("/findSysDictionaryDetail", h.FindDetail)
|
|
details.GET("/getSysDictionaryDetailList", h.Details)
|
|
details.GET("/getDictionaryTreeList", h.Tree(false))
|
|
details.GET("/getDictionaryTreeListByType", h.Tree(true))
|
|
details.GET("/getDictionaryDetailsByParent", h.DetailsByParent)
|
|
details.GET("/getDictionaryPath", h.Path)
|
|
}
|