routes.go 5.9 KB

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