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跑腿暂不支持此操作") }