Merge branch 'jdshop' of e.coding.net:rosydev/jx-callback into jdshop
This commit is contained in:
@@ -262,6 +262,6 @@ func (c *BaseScheduler) CancelWaybill(bill *model.Waybill, cancelReasonID int, c
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
globals.SugarLogger.Debugf("BaseScheduler CancelWaybill return err==========%v", err)
|
globals.SugarLogger.Debugf("BaseScheduler CancelWaybill return bill.VendorWaybillID=%s,err==========%v", bill.VendorWaybillID, err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package tiktok_store
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
"fmt"
|
||||||
"git.rosy.net.cn/baseapi/platformapi/mtpsapi"
|
"git.rosy.net.cn/baseapi/platformapi/mtpsapi"
|
||||||
shop_getStoreDetail_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/shop_getStoreDetail/request"
|
shop_getStoreDetail_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/shop_getStoreDetail/request"
|
||||||
superm_createVirtualMobile_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/superm_createVirtualMobile/response"
|
superm_createVirtualMobile_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/superm_createVirtualMobile/response"
|
||||||
@@ -109,10 +110,17 @@ func (c *DeliveryHandler) CreateWaybill(order *model.GoodsOrder, maxDeliveryFee
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *DeliveryHandler) CancelWaybill(bill *model.Waybill, cancelReasonID int, cancelReason string) (err error) {
|
func (c *DeliveryHandler) CancelWaybill(bill *model.Waybill, cancelReasonID int, cancelReason string) (err error) {
|
||||||
err = getAPI(bill.VendorOrgCode).CancelPlatformPickUp(utils.Str2Int64(bill.VendorWaybillID))
|
if localOrder, _, err := dao.GetOrders(dao.GetDB(), []int64{utils.Str2Int64(bill.VendorOrderID)}, false, false, "", "", false, []int{0}, false, "", nil, 0, 0); err != nil {
|
||||||
bill.Status = model.WaybillStatusCanceled
|
return errors.New("取消运单时,获取平台门店ID失败,请重试")
|
||||||
bill.Remark = cancelReason
|
} else {
|
||||||
partner.CurOrderManager.OnWaybillStatusChanged(bill)
|
if err = getAPI(bill.VendorOrgCode).ShopOrderDispatcher(utils.Str2Int64(localOrder[0].VendorStoreID), bill.VendorOrderID, tiktok_api.DispatcherFeeTypeCancel); err != nil {
|
||||||
|
globals.SugarLogger.Debugf("抖音配送取消运力失败:%v", err)
|
||||||
|
return fmt.Errorf("抖音配送取消运力失败:%v", err)
|
||||||
|
}
|
||||||
|
bill.Status = model.WaybillStatusCanceled
|
||||||
|
bill.Remark = cancelReason
|
||||||
|
partner.CurOrderManager.OnWaybillStatusChanged(bill)
|
||||||
|
}
|
||||||
globals.SugarLogger.Debugf("DYPS CancelWaybill bill.Status=%d err=%v", bill.Status, err)
|
globals.SugarLogger.Debugf("DYPS CancelWaybill bill.Status=%d err=%v", bill.Status, err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user