routes.go 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  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. auth "git.i2edu.net/i2/i2-bill-api/internal/handler/auth"
  7. base_organ "git.i2edu.net/i2/i2-bill-api/internal/handler/base_organ"
  8. mkt_network_detail "git.i2edu.net/i2/i2-bill-api/internal/handler/mkt_network_detail"
  9. mkt_part_time_user "git.i2edu.net/i2/i2-bill-api/internal/handler/mkt_part_time_user"
  10. sys_optionset "git.i2edu.net/i2/i2-bill-api/internal/handler/sys_optionset"
  11. user "git.i2edu.net/i2/i2-bill-api/internal/handler/user"
  12. "git.i2edu.net/i2/i2-bill-api/internal/svc"
  13. "git.i2edu.net/i2/go-zero/rest"
  14. )
  15. func RegisterHandlers(engine *rest.Server, serverCtx *svc.ServiceContext) {
  16. engine.AddRoutes(
  17. []rest.Route{
  18. {
  19. Method: http.MethodGet,
  20. Path: "/api/hello",
  21. Handler: auth.HelloHandler(serverCtx),
  22. },
  23. {
  24. Method: http.MethodPost,
  25. Path: "/api/auth/loginByWeixin",
  26. Handler: auth.LoginByWeixinHandler(serverCtx),
  27. },
  28. },
  29. )
  30. engine.AddRoutes(
  31. []rest.Route{
  32. {
  33. Method: http.MethodGet,
  34. Path: "/api/user/share/jzQrcode",
  35. Handler: user.JzQrCodeHandler(serverCtx),
  36. },
  37. {
  38. Method: http.MethodPost,
  39. Path: "/api/user/bindMobile",
  40. Handler: user.BindMobileHandler(serverCtx),
  41. },
  42. {
  43. Method: http.MethodGet,
  44. Path: "/api/user/info",
  45. Handler: user.GetUserHandler(serverCtx),
  46. },
  47. {
  48. Method: http.MethodPost,
  49. Path: "/api/user/punchClock",
  50. Handler: user.PunchClockHandler(serverCtx),
  51. },
  52. },
  53. rest.WithJwt(serverCtx.Config.JwtAuth.AccessSecret),
  54. )
  55. engine.AddRoutes(
  56. []rest.Route{
  57. {
  58. Method: http.MethodPost,
  59. Path: "/api/v1/part_time_user/add",
  60. Handler: mkt_part_time_user.MktPartTimeUserAddHandler(serverCtx),
  61. },
  62. {
  63. Method: http.MethodPost,
  64. Path: "/api/v1/part_time_user/update",
  65. Handler: mkt_part_time_user.MktPartTimeUserUpdateHandler(serverCtx),
  66. },
  67. {
  68. Method: http.MethodGet,
  69. Path: "/api/v1/part_time_user/get",
  70. Handler: mkt_part_time_user.MktPartTimeUserGetHandler(serverCtx),
  71. },
  72. {
  73. Method: http.MethodGet,
  74. Path: "/api/v1/part_time_user/total",
  75. Handler: mkt_part_time_user.MktPartTimeUserTotalHandler(serverCtx),
  76. },
  77. },
  78. rest.WithJwt(serverCtx.Config.JwtAuth.AccessSecret),
  79. )
  80. engine.AddRoutes(
  81. []rest.Route{
  82. {
  83. Method: http.MethodPost,
  84. Path: "/api/acquirer/enroll",
  85. Handler: acquirer.EnrollHandler(serverCtx),
  86. },
  87. {
  88. Method: http.MethodPost,
  89. Path: "/api/acquirer/enroll/page",
  90. Handler: acquirer.EnrollPageHandler(serverCtx),
  91. },
  92. {
  93. Method: http.MethodGet,
  94. Path: "/api/acquirer/enroll/total",
  95. Handler: acquirer.EnrollTotalHandler(serverCtx),
  96. },
  97. },
  98. rest.WithJwt(serverCtx.Config.JwtAuth.AccessSecret),
  99. )
  100. engine.AddRoutes(
  101. []rest.Route{
  102. {
  103. Method: http.MethodGet,
  104. Path: "/api/v1/base_organ/get_erp_city_tree",
  105. Handler: base_organ.GetErpCityTreeHandler(serverCtx),
  106. },
  107. },
  108. rest.WithJwt(serverCtx.Config.JwtAuth.AccessSecret),
  109. )
  110. engine.AddRoutes(
  111. []rest.Route{
  112. {
  113. Method: http.MethodGet,
  114. Path: "/api/v1/sys_optionset/get_erp_optionset",
  115. Handler: sys_optionset.GetErpOptionsetHandler(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/mkt_network_detail/get_erp_mkt_network_detail",
  125. Handler: mkt_network_detail.GetErpMktNetworkDetailHandler(serverCtx),
  126. },
  127. },
  128. rest.WithJwt(serverCtx.Config.JwtAuth.AccessSecret),
  129. )
  130. }