+ handleWaybillTip
This commit is contained in:
@@ -447,7 +447,7 @@ func (c *PurchaseHandler) UpdateWaybillTip(ctx *jxcontext.Context, order *model.
|
||||
orderInfo, err := api.JdAPI.QuerySingleOrder2(order.VendorOrderID)
|
||||
if err == nil {
|
||||
tip2Add := int(tipFee) - orderInfo.Tips
|
||||
if tip2Add > 0 {
|
||||
if tip2Add != 0 {
|
||||
if globals.EnableJdStoreWrite {
|
||||
err = api.JdAPI.OrderAddTips(order.VendorOrderID, tip2Add, ctx.GetUserName())
|
||||
}
|
||||
|
||||
@@ -576,9 +576,9 @@ func (c *PurchaseHandler) ListOrders(ctx *jxcontext.Context, parentTask tasksch.
|
||||
return vendorOrderIDs, err
|
||||
}
|
||||
|
||||
func (c *PurchaseHandler) UpdateWaybillTip(ctx *jxcontext.Context, order *model.GoodsOrder, tipFee int64) (err error) {
|
||||
if globals.EnableMtwmStoreWrite {
|
||||
err = api.MtwmAPI.OrderUpdateTip(utils.Str2Int64(order.VendorOrderID), jxutils.IntPrice2Standard(tipFee))
|
||||
}
|
||||
return err
|
||||
}
|
||||
// func (c *PurchaseHandler) UpdateWaybillTip(ctx *jxcontext.Context, order *model.GoodsOrder, tipFee int64) (err error) {
|
||||
// if globals.EnableMtwmStoreWrite {
|
||||
// err = api.MtwmAPI.OrderUpdateTip(utils.Str2Int64(order.VendorOrderID), jxutils.IntPrice2Standard(tipFee))
|
||||
// }
|
||||
// return err
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user