[优化]base模块提出

This commit is contained in:
PandaGoAdmin
2022-08-02 22:37:37 +08:00
parent 0555922a90
commit 2cb23c0ecf
151 changed files with 550 additions and 5255 deletions

View File

@@ -1,10 +1,10 @@
package router
import (
"github.com/XM-GO/PandaKit/restfulx"
"github.com/gin-gonic/gin"
"pandax/apps/system/api"
"pandax/apps/system/services"
"pandax/base/ginx"
)
func InitRoleRouter(router *gin.RouterGroup) {
@@ -17,34 +17,34 @@ func InitRoleRouter(router *gin.RouterGroup) {
role := router.Group("role")
role.GET("list", func(c *gin.Context) {
ginx.NewReqCtx(c).WithLog("获取角色分页列表").Handle(s.GetRoleList)
restfulx.NewReqCtx(c).WithLog("获取角色分页列表").Handle(s.GetRoleList)
})
role.GET(":roleId", func(c *gin.Context) {
ginx.NewReqCtx(c).WithLog("获取角色信息").Handle(s.GetRole)
restfulx.NewReqCtx(c).WithLog("获取角色信息").Handle(s.GetRole)
})
role.POST("", func(c *gin.Context) {
ginx.NewReqCtx(c).WithLog("添加角色信息").Handle(s.InsertRole)
restfulx.NewReqCtx(c).WithLog("添加角色信息").Handle(s.InsertRole)
})
role.PUT("", func(c *gin.Context) {
ginx.NewReqCtx(c).WithLog("修改角色信息").Handle(s.UpdateRole)
restfulx.NewReqCtx(c).WithLog("修改角色信息").Handle(s.UpdateRole)
})
role.PUT("changeStatus", func(c *gin.Context) {
ginx.NewReqCtx(c).WithLog("修改角色状态").Handle(s.UpdateRoleStatus)
restfulx.NewReqCtx(c).WithLog("修改角色状态").Handle(s.UpdateRoleStatus)
})
role.PUT("dataScope", func(c *gin.Context) {
ginx.NewReqCtx(c).WithLog("修改角色部门权限").Handle(s.UpdateRoleDataScope)
restfulx.NewReqCtx(c).WithLog("修改角色部门权限").Handle(s.UpdateRoleDataScope)
})
role.DELETE(":roleId", func(c *gin.Context) {
ginx.NewReqCtx(c).WithLog("删除角色信息").Handle(s.DeleteRole)
restfulx.NewReqCtx(c).WithLog("删除角色信息").Handle(s.DeleteRole)
})
role.GET("export", func(c *gin.Context) {
ginx.NewReqCtx(c).WithLog("导出角色信息").Handle(s.ExportRole)
restfulx.NewReqCtx(c).WithLog("导出角色信息").Handle(s.ExportRole)
})
}