routes.go 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. // Code generated by goctl. DO NOT EDIT.
  2. package handler
  3. import (
  4. "net/http"
  5. acquirer "git.i2edu.net/i2/i2-bill-api/internal/handler/acquirer"
  6. acquirer_student "git.i2edu.net/i2/i2-bill-api/internal/handler/acquirer_student"
  7. auth "git.i2edu.net/i2/i2-bill-api/internal/handler/auth"
  8. base_organ "git.i2edu.net/i2/i2-bill-api/internal/handler/base_organ"
  9. mkt_network_detail "git.i2edu.net/i2/i2-bill-api/internal/handler/mkt_network_detail"
  10. mkt_part_time_user "git.i2edu.net/i2/i2-bill-api/internal/handler/mkt_part_time_user"
  11. sys_optionset "git.i2edu.net/i2/i2-bill-api/internal/handler/sys_optionset"
  12. user "git.i2edu.net/i2/i2-bill-api/internal/handler/user"
  13. "git.i2edu.net/i2/i2-bill-api/internal/svc"
  14. "git.i2edu.net/i2/go-zero/rest"
  15. )
  16. func RegisterHandlers(engine *rest.Server, serverCtx *svc.ServiceContext) {
  17. engine.AddRoutes(
  18. []rest.Route{
  19. {
  20. Method: http.MethodGet,
  21. Path: "/api/hello",
  22. Handler: auth.HelloHandler(serverCtx),
  23. },
  24. {
  25. Method: http.MethodPost,
  26. Path: "/api/auth/loginByWeixin",
  27. Handler: auth.LoginByWeixinHandler(serverCtx),
  28. },
  29. },
  30. )
  31. engine.AddRoutes(
  32. []rest.Route{
  33. {
  34. Method: http.MethodGet,
  35. Path: "/api/user/share/jzQrcode",
  36. Handler: user.JzQrCodeHandler(serverCtx),
  37. },
  38. {
  39. Method: http.MethodPost,
  40. Path: "/api/user/bindMobile",
  41. Handler: user.BindMobileHandler(serverCtx),
  42. },
  43. {
  44. Method: http.MethodGet,
  45. Path: "/api/user/info",
  46. Handler: user.GetUserHandler(serverCtx),
  47. },
  48. {
  49. Method: http.MethodPost,
  50. Path: "/api/user/punchClock",
  51. Handler: user.PunchClockHandler(serverCtx),
  52. },
  53. {
  54. Method: http.MethodGet,
  55. Path: "/api/user/punchClock/page",
  56. Handler: user.PunchClockPageHandler(serverCtx),
  57. },
  58. {
  59. Method: http.MethodGet,
  60. Path: "/api/user/punchClock/get_to_day",
  61. Handler: user.PunchClockGetHandler(serverCtx),
  62. },
  63. },
  64. rest.WithJwt(serverCtx.Config.JwtAuth.AccessSecret),
  65. )
  66. engine.AddRoutes(
  67. []rest.Route{
  68. {
  69. Method: http.MethodPost,
  70. Path: "/api/v1/part_time_user/add",
  71. Handler: mkt_part_time_user.MktPartTimeUserAddHandler(serverCtx),
  72. },
  73. {
  74. Method: http.MethodPost,
  75. Path: "/api/v1/part_time_user/update",
  76. Handler: mkt_part_time_user.MktPartTimeUserUpdateHandler(serverCtx),
  77. },
  78. {
  79. Method: http.MethodGet,
  80. Path: "/api/v1/part_time_user/get",
  81. Handler: mkt_part_time_user.MktPartTimeUserGetHandler(serverCtx),
  82. },
  83. },
  84. rest.WithJwt(serverCtx.Config.JwtAuth.AccessSecret),
  85. )
  86. engine.AddRoutes(
  87. []rest.Route{
  88. {
  89. Method: http.MethodPost,
  90. Path: "/api/acquirer/enroll",
  91. Handler: acquirer.EnrollHandler(serverCtx),
  92. },
  93. },
  94. rest.WithJwt(serverCtx.Config.JwtAuth.AccessSecret),
  95. )
  96. engine.AddRoutes(
  97. []rest.Route{
  98. {
  99. Method: http.MethodPost,
  100. Path: "/api/v1/acquirer_student/page",
  101. Handler: acquirer_student.AcquirerStudentPageHandler(serverCtx),
  102. },
  103. {
  104. Method: http.MethodGet,
  105. Path: "/api/v1/acquirer_student/total",
  106. Handler: acquirer_student.AcquirerStudentTotalHandler(serverCtx),
  107. },
  108. },
  109. rest.WithJwt(serverCtx.Config.JwtAuth.AccessSecret),
  110. )
  111. engine.AddRoutes(
  112. []rest.Route{
  113. {
  114. Method: http.MethodPost,
  115. Path: "/api/v1/acquirer_student/add",
  116. Handler: acquirer_student.AcquirerStudentAddHandler(serverCtx),
  117. },
  118. },
  119. )
  120. engine.AddRoutes(
  121. []rest.Route{
  122. {
  123. Method: http.MethodGet,
  124. Path: "/api/v1/base_organ/get_erp_city_tree",
  125. Handler: base_organ.GetErpCityTreeHandler(serverCtx),
  126. },
  127. },
  128. rest.WithJwt(serverCtx.Config.JwtAuth.AccessSecret),
  129. )
  130. engine.AddRoutes(
  131. []rest.Route{
  132. {
  133. Method: http.MethodGet,
  134. Path: "/api/v1/sys_optionset/get_erp_optionset",
  135. Handler: sys_optionset.GetErpOptionsetHandler(serverCtx),
  136. },
  137. },
  138. rest.WithJwt(serverCtx.Config.JwtAuth.AccessSecret),
  139. )
  140. engine.AddRoutes(
  141. []rest.Route{
  142. {
  143. Method: http.MethodGet,
  144. Path: "/api/v1/mkt_network_detail/get_erp_mkt_network_detail",
  145. Handler: mkt_network_detail.GetErpMktNetworkDetailHandler(serverCtx),
  146. },
  147. },
  148. rest.WithJwt(serverCtx.Config.JwtAuth.AccessSecret),
  149. )
  150. }