调整加订单配送小费逻辑,添加美团外卖平台支持
This commit is contained in:
@@ -661,7 +661,7 @@ func (c *PurchaseHandler) ListOrders(ctx *jxcontext.Context, vendorOrgCode strin
|
||||
return vendorOrderIDs, err
|
||||
}
|
||||
|
||||
func (c *PurchaseHandler) GetWaybillTip(ctx *jxcontext.Context, vendorOrgCode, vendorOrderID, vendorWaybillID, vendorWaybillID2 string) (tipFee int64, err error) {
|
||||
func (c *PurchaseHandler) GetWaybillTip(ctx *jxcontext.Context, vendorOrgCode, vendorStoreID, vendorOrderID, vendorWaybillID, vendorWaybillID2 string) (tipFee int64, err error) {
|
||||
orderInfo, err := api.EbaiAPI.GetStoreOrderInfo(vendorOrderID)
|
||||
if err == nil {
|
||||
if orderBasic, _ := orderInfo["order_basic"].(map[string]interface{}); orderBasic != nil {
|
||||
@@ -671,12 +671,9 @@ func (c *PurchaseHandler) GetWaybillTip(ctx *jxcontext.Context, vendorOrgCode, v
|
||||
return tipFee, err
|
||||
}
|
||||
|
||||
func (c *PurchaseHandler) AddWaybillTip(ctx *jxcontext.Context, vendorOrgCode, vendorOrderID, vendorWaybillID, vendorWaybillID2, cityCode string, tipFee2Add int64) (err error) {
|
||||
tipFee, err := c.GetWaybillTip(ctx, vendorOrgCode, vendorOrderID, vendorWaybillID, vendorWaybillID2)
|
||||
if err == nil {
|
||||
if globals.EnableEbaiStoreWrite {
|
||||
err = api.EbaiAPI.ModifyTip4OrderWaybill(vendorOrderID, "", jxutils.IntPrice2Standard(tipFee), 0)
|
||||
}
|
||||
func (c *PurchaseHandler) UpdateWaybillTip(ctx *jxcontext.Context, vendorOrgCode, vendorStoreID, vendorOrderID, vendorWaybillID, vendorWaybillID2, cityCode string, tipFee int64) (err error) {
|
||||
if globals.EnableEbaiStoreWrite {
|
||||
err = api.EbaiAPI.ModifyTip4OrderWaybill(vendorOrderID, "", jxutils.IntPrice2Standard(tipFee), 0)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user