rcrt.go 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. package routers
  2. import (
  3. "github.com/gin-gonic/gin"
  4. "hongze/hrms_api/controller/rcrt"
  5. "hongze/hrms_api/middleware"
  6. )
  7. func InitRcrt(group *gin.RouterGroup) {
  8. //简历
  9. cvController := new(rcrt.CvController)
  10. cvGroup := group.Group("cv/").Use(middleware.Token())
  11. cvGroup.GET("list", cvController.List)
  12. cvGroup.PUT("result/set", cvController.SetResult)
  13. cvGroup.DELETE("delete", cvController.Delete)
  14. outCvController := new(rcrt.OutCvController)
  15. cvGroup.GET("out/list", outCvController.List)
  16. cvGroup.DELETE("out/delete", outCvController.Delete)
  17. cvGroup.GET("out/admins", outCvController.AdminList)
  18. cvGroup.PUT("out/reset", outCvController.Reset)
  19. //招聘流程
  20. processController := new(rcrt.ProcessController)
  21. processGroup := group.Group("process/").Use(middleware.Token())
  22. processGroup.GET("list", processController.List)
  23. processGroup.GET("pass/list", processController.PassList)
  24. processGroup.GET("pass/admins", processController.PassAdminList)
  25. processGroup.PUT("result/set", processController.SetResult)
  26. processGroup.PUT("first/set", processController.SetFirstRecommend)
  27. processGroup.PUT("second/set", processController.SetSecondRecommend)
  28. processGroup.PUT("cancel", processController.Cancel)
  29. processGroup.DELETE("delete", processController.Delete)
  30. processGroup.PUT("reset", processController.Reset)
  31. //hr邮箱管理
  32. hrEmailController := new(rcrt.HrEmailController)
  33. hrEmailGroup := group.Group("hr_email/").Use(middleware.Token())
  34. hrEmailGroup.POST("add", hrEmailController.Add)
  35. hrEmailGroup.GET("list", hrEmailController.List)
  36. hrEmailGroup.DELETE("delete", hrEmailController.Delete)
  37. hrEmailGroup.PUT("edit", hrEmailController.Edit)
  38. //标准化说明
  39. deController := new(rcrt.DescriptionController)
  40. deGroup := group.Group("description/").Use(middleware.Token())
  41. deGroup.POST("add", deController.Add)
  42. deGroup.GET("last", deController.GetLatest)
  43. }