This commit is contained in:
richboo111
2022-12-28 17:35:13 +08:00
parent 1061c0a43a
commit 51c216be04

View File

@@ -110,9 +110,11 @@ func (c *DeliveryHandler) CreateWaybill(order *model.GoodsOrder, maxDeliveryFee
}
func (c *DeliveryHandler) CancelWaybill(bill *model.Waybill, cancelReasonID int, cancelReason string) (err error) {
globals.SugarLogger.Debugf("进入DYPS CancelWaybill")
if localOrder, _, err := dao.GetOrders(dao.GetDB(), []int64{utils.Str2Int64(bill.VendorOrderID)}, false, false, "", "", false, []int{0}, false, "", nil, 0, 0); err != nil {
return errors.New("取消运单时获取平台门店ID失败请重试")
} else {
globals.SugarLogger.Debugf("localOrder=%s", utils.Format4Output(localOrder, false))
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)