package mkt_network_detail

import (
	"net/http"

	"git.i2edu.net/i2/go-zero/rest/httpx"
	"git.i2edu.net/i2/i2-bill-api/internal/logic/mkt_network_detail"
	"git.i2edu.net/i2/i2-bill-api/internal/svc"
)

func GetErpMktNetworkDetailHandler(ctx *svc.ServiceContext) http.HandlerFunc {
	return func(w http.ResponseWriter, r *http.Request) {

		l := mkt_network_detail.NewGetErpMktNetworkDetailLogic(r.Context(), ctx)
		resp, err := l.GetErpMktNetworkDetail()
		if err != nil {
			httpx.Error(w, err)
		} else {
			httpx.OkJson(w, resp)
		}
	}
}
