muyu-apiserver/gateway/internal/handler/purchase/order/cancelpurchaseorderhandler.go
Chever John a25acdc5e4 chore: sync codebase with upstream
Pull latest changes from upstream/main (GitHub) including:
- Purchase RPC service (proto, server, logic, models)
- Gateway route updates for purchase endpoints
- SQL migration and config updates

Excludes deploy/bin/ pre-compiled arm64 binaries (builds use
multi-stage Dockerfiles targeting amd64).
2026-06-15 09:20:56 +08:00

22 lines
524 B
Go

package order
import (
"net/http"
"github.com/zeromicro/go-zero/rest/httpx"
"muyu-apiserver/gateway/internal/logic/purchase/order"
"muyu-apiserver/gateway/internal/svc"
)
func CancelPurchaseOrderHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
l := order.NewCancelPurchaseOrderLogic(r.Context(), svcCtx)
err := l.CancelPurchaseOrder()
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.OkJsonCtx(r.Context(), w, nil)
}
}
}