unit.go 1.0 KB

12345678910111213141516171819202122232425
  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 UnitRouter struct {
  8. }
  9. // InitUnitRouter 初始化 Unit 路由信息
  10. func (s *UnitRouter) InitUnitRouter(Router *gin.RouterGroup) {
  11. unitRouter := Router.Group("unit").Use(middleware.OperationRecord())
  12. var unitApi = v1.ApiGroupApp.AutoCodeApiGroup.UnitApi
  13. {
  14. unitRouter.POST("createUnit", unitApi.CreateUnit) // 新建Unit
  15. unitRouter.DELETE("deleteUnit", unitApi.DeleteUnit) // 删除Unit
  16. unitRouter.DELETE("deleteUnitByIds", unitApi.DeleteUnitByIds) // 批量删除Unit
  17. unitRouter.PUT("updateUnit", unitApi.UpdateUnit) // 更新Unit
  18. unitRouter.GET("findUnit", unitApi.FindUnit) // 根据ID获取Unit
  19. unitRouter.GET("updateUnitIntergral", unitApi.UpdateUnitIntergral) // jifen
  20. unitRouter.GET("getUnitList", unitApi.GetUnitList) // 获取Unit列表
  21. }
  22. }