organization.go 1.8 KB

12345678910111213141516171819202122232425262728293031323334
  1. package autocode
  2. import (
  3. "github.com/flipped-aurora/gin-vue-admin/server/api/v1"
  4. "github.com/flipped-aurora/gin-vue-admin/server/middleware"
  5. "github.com/gin-gonic/gin"
  6. )
  7. type OrganizationRouter struct {
  8. }
  9. // InitOrganizationRouter 初始化 Organization 路由信息
  10. func (s *OrganizationRouter) InitOrganizationRouter(Router *gin.RouterGroup) {
  11. organizationRouter := Router.Group("organization").Use(middleware.OperationRecord())
  12. var organizationApi = v1.ApiGroupApp.AutoCodeApiGroup.OrganizationApi
  13. {
  14. organizationRouter.POST("createOrganization", organizationApi.CreateOrganization) // 新建Organization
  15. organizationRouter.DELETE("deleteOrganization", organizationApi.DeleteOrganization) // 删除Organization
  16. organizationRouter.DELETE("deleteOrganizationByIds", organizationApi.DeleteOrganizationByIds) // 批量删除Organization
  17. organizationRouter.PUT("updateOrganization", organizationApi.UpdateOrganization) // 更新Organization
  18. organizationRouter.GET("findOrganizationP", organizationApi.FindOrganization) // 根据ID获取Organization
  19. organizationRouter.GET("getOrganizationList", organizationApi.GetOrganizationList) // 获取Organization列表
  20. }
  21. }
  22. func (s *ContentRouter) InitOrganizationPRouter(Router *gin.RouterGroup) {
  23. organizationRouter := Router.Group("organization").Use(middleware.OperationRecord())
  24. var organizationApi = v1.ApiGroupApp.AutoCodeApiGroup.OrganizationApi
  25. {
  26. organizationRouter.GET("findOrganization", organizationApi.FindOrganization) // 根据ID获取Organization
  27. organizationRouter.GET("findOrganizationTree", organizationApi.FindOrganizationTree) // 根据ID获取Organization
  28. //contentRouter.GET("findContent", contentApi.FindContent) // 根据ID获取Content
  29. }
  30. }