problem_info.go 1.5 KB

1234567891011121314151617181920212223242526272829303132
  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.DELETE("deleteProblemInfo", problemInfoApi.DeleteProblemInfo) // 删除ProblemInfo
  17. problemInfoRouter.DELETE("deleteProblemInfoByIds", problemInfoApi.DeleteProblemInfoByIds) // 批量删除ProblemInfo
  18. problemInfoRouter.PUT("updateProblemInfo", problemInfoApi.UpdateProblemInfo) // 更新ProblemInfo
  19. problemInfoRouter.GET("getProblemInfoList", problemInfoApi.GetProblemInfoList) // 获取ProblemInfo列表
  20. }
  21. }
  22. func (s *ProblemInfoRouter) InitProblemInfoPRouter(Router *gin.RouterGroup) {
  23. problemInfoRouter := Router.Group("problemInfo").Use(middleware.OperationRecord())
  24. var problemInfoApi = v1.ApiGroupApp.AutoCodeApiGroup.ProblemInfoApi
  25. {
  26. problemInfoRouter.GET("findProblemInfo", problemInfoApi.FindProblemInfo) // 根据ID获取ProblemInfo
  27. }
  28. }