123456789101112131415161718192021222324252627 |
- package admin
- import (
- "github.com/gin-gonic/gin"
- v1 "server/api/v1"
- "server/middleware"
- )
- type DepartmentRouter struct{}
- func (s *DepartmentRouter) InitDepartmentRouter(Router *gin.RouterGroup) {
- departmentRouter := Router.Group("department").Use(middleware.OperationRecord())
- departmentRouterWithoutRecord := Router.Group("department")
- departmentApi := v1.ApiGroupApp.AdminApiGroup.DepartmentApi
- {
- departmentRouter.POST("createDep", departmentApi.CreateDep)
- departmentRouter.PUT("updateDep", departmentApi.UpdateDep)
- departmentRouter.PUT("updateDepStatus", departmentApi.UpdateDepStatus)
- departmentRouter.PUT("updateUserDep", departmentApi.UpdateUserDep)
- departmentRouter.DELETE("deleteDep/:depId", departmentApi.DeleteDep)
- }
- {
- departmentRouterWithoutRecord.GET("queryAllDep", departmentApi.QueryAllDep)
- departmentRouterWithoutRecord.GET("queryDepByStart", departmentApi.QueryDepByStart)
- }
- }
|