mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-05-10 22:02:09 +08:00
【更新】更新
This commit is contained in:
@@ -4,7 +4,7 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"pandax/apps/system/api"
|
||||
"pandax/apps/system/services"
|
||||
"pandax/base/ctx"
|
||||
"pandax/base/ginx"
|
||||
)
|
||||
|
||||
func InitDeptRouter(router *gin.RouterGroup) {
|
||||
@@ -15,38 +15,31 @@ func InitDeptRouter(router *gin.RouterGroup) {
|
||||
}
|
||||
dept := router.Group("dept")
|
||||
|
||||
roleDeptTreSelectLog := ctx.NewLogInfo("获取角色部门树")
|
||||
dept.GET("roleDeptTreeSelect/:roleId", func(c *gin.Context) {
|
||||
ctx.NewReqCtxWithGin(c).WithLog(roleDeptTreSelectLog).Handle(r.GetDeptTreeRoleSelect)
|
||||
ginx.NewReqCtx(c).WithLog("获取角色部门树").Handle(r.GetDeptTreeRoleSelect)
|
||||
})
|
||||
|
||||
deptTreeLog := ctx.NewLogInfo("获取所有部门树")
|
||||
dept.GET("deptTree", func(c *gin.Context) {
|
||||
ctx.NewReqCtxWithGin(c).WithLog(deptTreeLog).Handle(r.GetDeptTree)
|
||||
ginx.NewReqCtx(c).WithLog("获取所有部门树").Handle(r.GetDeptTree)
|
||||
})
|
||||
|
||||
deptListLog := ctx.NewLogInfo("获取部门列表")
|
||||
dept.GET("list", func(c *gin.Context) {
|
||||
ctx.NewReqCtxWithGin(c).WithLog(deptListLog).Handle(r.GetDeptList)
|
||||
ginx.NewReqCtx(c).WithLog("获取部门列表").Handle(r.GetDeptList)
|
||||
})
|
||||
|
||||
deptLog := ctx.NewLogInfo("获取部门信息")
|
||||
dept.GET(":deptId", func(c *gin.Context) {
|
||||
ctx.NewReqCtxWithGin(c).WithLog(deptLog).Handle(r.GetDept)
|
||||
ginx.NewReqCtx(c).WithLog("获取部门信息").Handle(r.GetDept)
|
||||
})
|
||||
|
||||
inertDeptLog := ctx.NewLogInfo("添加部门信息")
|
||||
dept.POST("", func(c *gin.Context) {
|
||||
ctx.NewReqCtxWithGin(c).WithLog(inertDeptLog).Handle(r.InsertDept)
|
||||
ginx.NewReqCtx(c).WithLog("添加部门信息").Handle(r.InsertDept)
|
||||
})
|
||||
|
||||
updateDeptLog := ctx.NewLogInfo("修改部门信息")
|
||||
dept.PUT("", func(c *gin.Context) {
|
||||
ctx.NewReqCtxWithGin(c).WithLog(updateDeptLog).Handle(r.UpdateDept)
|
||||
ginx.NewReqCtx(c).WithLog("修改部门信息").Handle(r.UpdateDept)
|
||||
})
|
||||
|
||||
deleteDeptLog := ctx.NewLogInfo("删除部门信息")
|
||||
dept.DELETE(":deptId", func(c *gin.Context) {
|
||||
ctx.NewReqCtxWithGin(c).WithLog(deleteDeptLog).Handle(r.DeleteDept)
|
||||
ginx.NewReqCtx(c).WithLog("删除部门信息").Handle(r.DeleteDept)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user