From 6add9ca9eeb2c4cab5972a8e603f2133f229ec90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Wed, 31 May 2023 15:39:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E8=B4=B9=E5=92=8C=E9=AA=91=E6=89=8B?= =?UTF-8?q?=E6=8A=95=E8=AF=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/partner/delivery/sfps/waybill.go | 8 ++++++++ business/partner/delivery/uupt/waybill.go | 14 ++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/business/partner/delivery/sfps/waybill.go b/business/partner/delivery/sfps/waybill.go index 4310940d1..37608da0d 100644 --- a/business/partner/delivery/sfps/waybill.go +++ b/business/partner/delivery/sfps/waybill.go @@ -275,6 +275,14 @@ func (d DeliveryHandler) GetRiderInfo(orderId string, deliveryId int64, mtPeison return result, nil } +func (c *DeliveryHandler) GetWaybillTip(ctx *jxcontext.Context, vendorOrgCode, vendorStoreID, vendorOrderID, vendorWaybillID, vendorWaybillID2 string) (tipFee int64, err error) { + return api.SfPsAPI.QueryTipFee(vendorWaybillID) +} + +func (c *DeliveryHandler) UpdateWaybillTip(ctx *jxcontext.Context, vendorOrgCode, vendorStoreID, vendorOrderID, vendorWaybillID, vendorWaybillID2, cityCode string, tipFee int64) (err error) { + return api.SfPsAPI.AddTipFee(vendorWaybillID, tipFee) +} + // OnWaybillMsg 配送状态更改回调 func OnWaybillMsg(urlIndex string, msg interface{}) (resp *sfps2.CallbackResponse) { order := GetWaybillByStatus(urlIndex, msg) diff --git a/business/partner/delivery/uupt/waybill.go b/business/partner/delivery/uupt/waybill.go index 910925a20..81f5b8c18 100644 --- a/business/partner/delivery/uupt/waybill.go +++ b/business/partner/delivery/uupt/waybill.go @@ -198,6 +198,20 @@ func (d DeliveryHandler) GetWaybillFee(order *model.GoodsOrder) (deliveryFeeInfo return deliveryFeeInfo, err } +func (c *DeliveryHandler) GetWaybillTip(ctx *jxcontext.Context, vendorOrgCode, vendorStoreID, vendorOrderID, vendorWaybillID, vendorWaybillID2 string) (tipFee int64, err error) { + // uu跑腿没有获取小费的接口,直接返回系统支付的金额 + //order, err := api.UuAPI.GetOrderDetail(vendorOrderID) + //if err == nil { + // tipFee = jxutils.StandardPrice2Int(order.Tips) + //} + //return tipFee, err + return 0, nil +} + +func (c *DeliveryHandler) UpdateWaybillTip(ctx *jxcontext.Context, vendorOrgCode, vendorStoreID, vendorOrderID, vendorWaybillID, vendorWaybillID2, cityCode string, tipFee int64) (err error) { + return api.UuAPI.AddTip(vendorOrderID, vendorWaybillID, int(tipFee)) +} + func (d DeliveryHandler) ComplaintRider(bill *model.Waybill, resonID int, resonContent string) (err error) { return fmt.Errorf("UU跑腿暂不支持此操作") }