routes.go 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  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_mkt_qr "git.i2edu.net/i2/i2-bill-api/internal/handler/acquirer_mkt_qr"
  7. acquirer_student "git.i2edu.net/i2/i2-bill-api/internal/handler/acquirer_student"
  8. auth "git.i2edu.net/i2/i2-bill-api/internal/handler/auth"
  9. base_organ "git.i2edu.net/i2/i2-bill-api/internal/handler/base_organ"
  10. base_organ_school "git.i2edu.net/i2/i2-bill-api/internal/handler/base_organ_school"
  11. mkt_active "git.i2edu.net/i2/i2-bill-api/internal/handler/mkt_active"
  12. mkt_network_detail "git.i2edu.net/i2/i2-bill-api/internal/handler/mkt_network_detail"
  13. mkt_part_time_user "git.i2edu.net/i2/i2-bill-api/internal/handler/mkt_part_time_user"
  14. sys_optionset "git.i2edu.net/i2/i2-bill-api/internal/handler/sys_optionset"
  15. user "git.i2edu.net/i2/i2-bill-api/internal/handler/user"
  16. "git.i2edu.net/i2/i2-bill-api/internal/svc"
  17. "git.i2edu.net/i2/go-zero/rest"
  18. )
  19. func RegisterHandlers(engine *rest.Server, serverCtx *svc.ServiceContext) {
  20. engine.AddRoutes(
  21. []rest.Route{
  22. {
  23. Method: http.MethodGet,
  24. Path: "/api/hello",
  25. Handler: auth.HelloHandler(serverCtx),
  26. },
  27. {
  28. Method: http.MethodPost,
  29. Path: "/api/auth/loginByWeixin",
  30. Handler: auth.LoginByWeixinHandler(serverCtx),
  31. },
  32. },
  33. )
  34. engine.AddRoutes(
  35. []rest.Route{
  36. {
  37. Method: http.MethodGet,
  38. Path: "/api/user/share/jzQrcode",
  39. Handler: user.JzQrCodeHandler(serverCtx),
  40. },
  41. {
  42. Method: http.MethodPost,
  43. Path: "/api/user/bindMobile",
  44. Handler: user.BindMobileHandler(serverCtx),
  45. },
  46. {
  47. Method: http.MethodGet,
  48. Path: "/api/user/info",
  49. Handler: user.GetUserHandler(serverCtx),
  50. },
  51. {
  52. Method: http.MethodPost,
  53. Path: "/api/user/punchClock",
  54. Handler: user.PunchClockHandler(serverCtx),
  55. },
  56. {
  57. Method: http.MethodGet,
  58. Path: "/api/user/punchClock/page",
  59. Handler: user.PunchClockPageHandler(serverCtx),
  60. },
  61. {
  62. Method: http.MethodGet,
  63. Path: "/api/user/punchClock/get_to_day",
  64. Handler: user.PunchClockGetHandler(serverCtx),
  65. },
  66. },
  67. rest.WithJwt(serverCtx.Config.JwtAuth.AccessSecret),
  68. )
  69. engine.AddRoutes(
  70. []rest.Route{
  71. {
  72. Method: http.MethodPost,
  73. Path: "/api/v1/part_time_user/add",
  74. Handler: mkt_part_time_user.MktPartTimeUserAddHandler(serverCtx),
  75. },
  76. {
  77. Method: http.MethodPost,
  78. Path: "/api/v1/part_time_user/update",
  79. Handler: mkt_part_time_user.MktPartTimeUserUpdateHandler(serverCtx),
  80. },
  81. {
  82. Method: http.MethodGet,
  83. Path: "/api/v1/part_time_user/get",
  84. Handler: mkt_part_time_user.MktPartTimeUserGetHandler(serverCtx),
  85. },
  86. },
  87. rest.WithJwt(serverCtx.Config.JwtAuth.AccessSecret),
  88. )
  89. engine.AddRoutes(
  90. []rest.Route{
  91. {
  92. Method: http.MethodPost,
  93. Path: "/api/acquirer/enroll",
  94. Handler: acquirer.EnrollHandler(serverCtx),
  95. },
  96. },
  97. rest.WithJwt(serverCtx.Config.JwtAuth.AccessSecret),
  98. )
  99. engine.AddRoutes(
  100. []rest.Route{
  101. {
  102. Method: http.MethodGet,
  103. Path: "/api/v1/acquirer_student/page",
  104. Handler: acquirer_student.AcquirerStudentPageHandler(serverCtx),
  105. },
  106. {
  107. Method: http.MethodGet,
  108. Path: "/api/v1/acquirer_student/total",
  109. Handler: acquirer_student.AcquirerStudentTotalHandler(serverCtx),
  110. },
  111. },
  112. rest.WithJwt(serverCtx.Config.JwtAuth.AccessSecret),
  113. )
  114. engine.AddRoutes(
  115. []rest.Route{
  116. {
  117. Method: http.MethodPost,
  118. Path: "/api/v1/acquirer_student/add",
  119. Handler: acquirer_student.AcquirerStudentAddHandler(serverCtx),
  120. },
  121. },
  122. )
  123. engine.AddRoutes(
  124. []rest.Route{
  125. {
  126. Method: http.MethodPost,
  127. Path: "/api/v1/acquirer_mkt_qr/update",
  128. Handler: acquirer_mkt_qr.AcquirerMktQrUpdateHandler(serverCtx),
  129. },
  130. {
  131. Method: http.MethodPost,
  132. Path: "/api/v1/acquirer_mkt_qr/get",
  133. Handler: acquirer_mkt_qr.AcquirerMktQrGetHandler(serverCtx),
  134. },
  135. },
  136. rest.WithJwt(serverCtx.Config.JwtAuth.AccessSecret),
  137. )
  138. engine.AddRoutes(
  139. []rest.Route{
  140. {
  141. Method: http.MethodGet,
  142. Path: "/api/v1/base_organ/get_erp_city_tree",
  143. Handler: base_organ.GetErpCityTreeHandler(serverCtx),
  144. },
  145. },
  146. rest.WithJwt(serverCtx.Config.JwtAuth.AccessSecret),
  147. )
  148. engine.AddRoutes(
  149. []rest.Route{
  150. {
  151. Method: http.MethodGet,
  152. Path: "/api/v1/sys_optionset/get_erp_optionset",
  153. Handler: sys_optionset.GetErpOptionsetHandler(serverCtx),
  154. },
  155. },
  156. rest.WithJwt(serverCtx.Config.JwtAuth.AccessSecret),
  157. )
  158. engine.AddRoutes(
  159. []rest.Route{
  160. {
  161. Method: http.MethodGet,
  162. Path: "/api/v1/mkt_network_detail/get_erp_mkt_network_detail",
  163. Handler: mkt_network_detail.GetErpMktNetworkDetailHandler(serverCtx),
  164. },
  165. },
  166. rest.WithJwt(serverCtx.Config.JwtAuth.AccessSecret),
  167. )
  168. engine.AddRoutes(
  169. []rest.Route{
  170. {
  171. Method: http.MethodGet,
  172. Path: "/api/v1/base_organ_school/get_erp_sch_perm",
  173. Handler: base_organ_school.GetErpSchPermHandler(serverCtx),
  174. },
  175. },
  176. rest.WithJwt(serverCtx.Config.JwtAuth.AccessSecret),
  177. )
  178. engine.AddRoutes(
  179. []rest.Route{
  180. {
  181. Method: http.MethodGet,
  182. Path: "/api/v1/mkt_active/get_erp_mkt_active",
  183. Handler: mkt_active.GetErpMktActiveHandler(serverCtx),
  184. },
  185. },
  186. rest.WithJwt(serverCtx.Config.JwtAuth.AccessSecret),
  187. )
  188. }