2 Star 0 Fork 0

hero/momo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
dict.go 829 Bytes
一键复制 编辑 原始数据 按行查看 历史
package controller
import (
"gitee.com/linqwen/momo/app"
"gitee.com/linqwen/momo/sys/conf/model"
"gitee.com/linqwen/momo/sys/conf/schema"
"gitee.com/linqwen/momo/sys/conf/service"
"github.com/gin-gonic/gin"
)
type dictCtl struct {
app.BaseController[model.DictEntity, schema.DictCreateDTO, schema.DictQueryDTO, schema.DictVO]
}
func NewDictCtl() *dictCtl {
return &dictCtl{BaseController: *app.NewBaseController[model.DictEntity, schema.DictCreateDTO, schema.DictQueryDTO, schema.DictVO](service.NewDictService())}
}
func DictRouter(router *gin.RouterGroup) {
var tc app.IBaseController = NewDictCtl()
c := tc.(*dictCtl)
r := router.Group("dict")
r.GET("/", c.PageByDTO)
r.POST("/", c.Create)
r.DELETE("/:id", c.Delete)
r.PUT("/:id", c.UpdateByMap)
r.GET("/:id", c.GetById)
r.POST("/deletes", c.BulkDelete)
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/linqwen/momo.git
git@gitee.com:linqwen/momo.git
linqwen
momo
momo
v1.8.1

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385