routes.go 6.4 KB

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