get_erp_city_tree_handler.go 493 B

12345678910111213141516171819202122
  1. package base_organ
  2. import (
  3. "net/http"
  4. "git.i2edu.net/i2/go-zero/rest/httpx"
  5. "git.i2edu.net/i2/i2-bill-api/internal/logic/base_organ"
  6. "git.i2edu.net/i2/i2-bill-api/internal/svc"
  7. )
  8. func GetErpCityTreeHandler(ctx *svc.ServiceContext) http.HandlerFunc {
  9. return func(w http.ResponseWriter, r *http.Request) {
  10. l := base_organ.NewGetErpCityTreeLogic(r.Context(), ctx)
  11. resp, err := l.GetErpCityTree()
  12. if err != nil {
  13. httpx.Error(w, err)
  14. } else {
  15. httpx.OkJson(w, resp)
  16. }
  17. }
  18. }