problem_info.go 1.8 KB

1234567891011121314151617181920212223242526272829303132333435
  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 ProblemInfoRouter struct {
  8. }
  9. // InitProblemInfoRouter 初始化 ProblemInfo 路由信息
  10. func (s *ProblemInfoRouter) InitProblemInfoRouter(Router *gin.RouterGroup) {
  11. problemInfoRouter := Router.Group("problemInfo").Use(middleware.OperationRecord())
  12. var problemInfoApi = v1.ApiGroupApp.AutoCodeApiGroup.ProblemInfoApi
  13. {
  14. problemInfoRouter.POST("createProblemInfo", problemInfoApi.CreateProblemInfo) // 新建ProblemInfo
  15. problemInfoRouter.POST("exportExcel", problemInfoApi.ExportExcel) // 导出Excel
  16. problemInfoRouter.POST("sendUser", problemInfoApi.SendUser) // 导出Excel
  17. problemInfoRouter.DELETE("deleteProblemInfo", problemInfoApi.DeleteProblemInfo) // 删除ProblemInfo
  18. problemInfoRouter.DELETE("deleteProblemInfoByIds", problemInfoApi.DeleteProblemInfoByIds) // 批量删除ProblemInfo
  19. problemInfoRouter.PUT("updateProblemInfo", problemInfoApi.UpdateProblemInfo) // 更新ProblemInfo
  20. problemInfoRouter.PUT("updateProblemInfoAudit", problemInfoApi.UpdateProblemInfoStatus) // 更新审核信息
  21. problemInfoRouter.GET("getProblemInfoList", problemInfoApi.GetProblemInfoList) // 获取ProblemInfo列表
  22. problemInfoRouter.GET("findProblemPInfo", problemInfoApi.FindProblemPInfo) // 根据ID获取ProblemInfo
  23. }
  24. }
  25. func (s *ProblemInfoRouter) InitProblemInfoPRouter(Router *gin.RouterGroup) {
  26. problemInfoRouter := Router.Group("problemInfo").Use(middleware.OperationRecord())
  27. var problemInfoApi = v1.ApiGroupApp.AutoCodeApiGroup.ProblemInfoApi
  28. {
  29. problemInfoRouter.GET("findProblemInfo", problemInfoApi.FindProblemInfo) // 根据ID获取ProblemInfo
  30. }
  31. }