problem_info.go 1.7 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 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.GET("getProblemInfoList", problemInfoApi.GetProblemInfoList) // 获取ProblemInfo列表
  21. problemInfoRouter.GET("findProblemPInfo", problemInfoApi.FindProblemPInfo) // 根据ID获取ProblemInfo
  22. }
  23. }
  24. func (s *ProblemInfoRouter) InitProblemInfoPRouter(Router *gin.RouterGroup) {
  25. problemInfoRouter := Router.Group("problemInfo").Use(middleware.OperationRecord())
  26. var problemInfoApi = v1.ApiGroupApp.AutoCodeApiGroup.ProblemInfoApi
  27. {
  28. problemInfoRouter.GET("findProblemInfo", problemInfoApi.FindProblemInfo) // 根据ID获取ProblemInfo
  29. }
  30. }