From 398db9262a0e6925db2679f26e85768832ea1c95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Fri, 21 Aug 2020 09:34:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=8B=E5=8A=A8=E7=BB=93=E5=B1=80=E5=8D=95?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxcallback/orderman/order.go | 5 +++++ controllers/jx_order.go | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/business/jxcallback/orderman/order.go b/business/jxcallback/orderman/order.go index 0e0ae072b..5944df58c 100644 --- a/business/jxcallback/orderman/order.go +++ b/business/jxcallback/orderman/order.go @@ -1574,3 +1574,8 @@ func UpdateWaybillDesiredFee(ctx *jxcontext.Context, vendorOrderID string, desir } return err } + +func AcceptOrRefuseOrder(ctx *jxcontext.Context, vendorOrderID string, vendorID int, isAccept bool) (err error) { + order, err := partner.CurOrderManager.LoadOrder(vendorOrderID, vendorID) + return err +} diff --git a/controllers/jx_order.go b/controllers/jx_order.go index 63b872ad7..2398e74e8 100644 --- a/controllers/jx_order.go +++ b/controllers/jx_order.go @@ -1134,3 +1134,19 @@ func (c *OrderController) UpdateWaybillDesiredFee() { return retVal, "", err }) } + +// @Title 接单或拒单 +// @Description 接单或拒单 +// @Param token header string true "认证token" +// @Param vendorOrderID formData string true "订单ID" +// @Param vendorID formData int true "订单平台ID" +// @Param isAccept formData bool true "接单或者拒单" +// @Success 200 {object} controllers.CallResult +// @Failure 200 {object} controllers.CallResult +// @router /AcceptOrRefuseOrder [post] +func (c *OrderController) AcceptOrRefuseOrder() { + c.callAcceptOrRefuseOrder(func(params *tOrderAcceptOrRefuseOrderParams) (retVal interface{}, errCode string, err error) { + err = orderman.AcceptOrRefuseOrder(params.Ctx, params.VendorOrderID, params.VendorID, params.IsAccept) + return retVal, "", err + }) +}