package handler import ( "net/http" "app.yhyue.com/moapp/jyOrder/api/internal/logic" "app.yhyue.com/moapp/jyOrder/api/internal/svc" "app.yhyue.com/moapp/jyOrder/api/internal/types" "github.com/zeromicro/go-zero/rest/httpx" ) func UpdateOrderHandler(ctx *svc.ServiceContext) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { var req types.Request if err := httpx.Parse(r, &req); err != nil { httpx.Error(w, err) return } l := logic.NewUpdateOrderLogic(r.Context(), ctx) resp, err := l.UpdateOrder(req) if err != nil { httpx.Error(w, err) } else { httpx.OkJson(w, resp) } } }