package handler import ( "net/http" "github.com/zeromicro/go-zero/rest/httpx" "userCenter/api/internal/logic" "userCenter/api/internal/svc" "userCenter/api/internal/types" ) func EntListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { var req types.EntListReq if err := httpx.Parse(r, &req); err != nil { httpx.Error(w, err) return } l := logic.NewEntListLogic(r.Context(), svcCtx) resp, err := l.EntList(&req) if err != nil { httpx.Error(w, err) } else { httpx.OkJson(w, resp) } } }