package handler import ( "net/http" "github.com/zeromicro/go-zero/rest/httpx" "app.yhyue.com/moapp/jyInfo/api/internal/logic" "app.yhyue.com/moapp/jyInfo/api/internal/svc" ) func getIndustryHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { l := logic.NewGetIndustryLogic(r.Context(), svcCtx) resp, err := l.GetIndustry() if err != nil { httpx.Error(w, err) } else { httpx.OkJson(w, resp) } } }