1
This commit is contained in:
@@ -621,14 +621,14 @@ func (c *PurchaseHandler) CanSwitch2SelfDeliver(order *model.GoodsOrder) (isCan
|
||||
|
||||
// Swtich2SelfDeliver 抖音转自送的时候就是通知抖音发货了
|
||||
func (c *PurchaseHandler) Swtich2SelfDeliver(order *model.GoodsOrder, userName string) (err error) {
|
||||
api := getAPI(order.VendorOrgCode, 0, "")
|
||||
apiObj := getAPI(order.VendorOrgCode, 0, "")
|
||||
remoteWaybill, _ := c.GetDYPSRiderInfo(order.VendorOrderID)
|
||||
if remoteWaybill != nil {
|
||||
if remoteWaybill.Status >= tiktokShop.ShipmentStatusArrived && remoteWaybill.Status != tiktokShop.ShipmentStatusCanceled { //骑手取货后不可取消
|
||||
return errors.New("抖音配送骑手已取货,不可转门店自配送/三方配送")
|
||||
}
|
||||
if remoteWaybill.Status < tiktokShop.ShipmentStatusArrived /*|| remoteWaybill.Status == tiktokShop.ShipmentStatusCanceled */ { //存在运单
|
||||
if err := api.ShopOrderDispatcher(utils.Str2Int64(order.VendorStoreID), order.VendorOrderID, tiktokShop.DispatcherFeeTypeCancel); err != nil {
|
||||
if err := apiObj.ShopOrderDispatcher(utils.Str2Int64(order.VendorStoreID), order.VendorOrderID, tiktokShop.DispatcherFeeTypeCancel); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
@@ -646,7 +646,7 @@ func (c *PurchaseHandler) Swtich2SelfDeliver(order *model.GoodsOrder, userName s
|
||||
}
|
||||
logisticsAdd.CompanyCode = tiktokShop.JxVendorId2TiktokCode(order.WaybillVendorID)
|
||||
//转门店自送通知抖音发货
|
||||
return api.OrderDelivering(logisticsAdd)
|
||||
return apiObj.OrderDelivering(logisticsAdd)
|
||||
}
|
||||
|
||||
// Swtich2SelfDelivered 暂无自送完成
|
||||
|
||||
@@ -406,9 +406,9 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
|
||||
|
||||
// 修改商品
|
||||
param.ProductId = mainIdInt
|
||||
param.MainProductId = mainIdInt
|
||||
//param.MainProductId = mainIdInt
|
||||
//param.FreightId, _ = api.GetStoreBindTemp(utils.Str2Int64(vendorStoreID))
|
||||
param.SpecPrices = GetSpecPrices(param.Specs, vendorStoreID, param.MainProductId, storeSku)
|
||||
param.SpecPrices = GetSpecPrices(param.Specs, vendorStoreID, mainIdInt, storeSku)
|
||||
if err := api.EditStoreCommodity(param); err != nil && !strings.Contains(err.Error(), "您上传的商品主图存在重复") {
|
||||
failedList = putils.GetErrMsg2FailedSingleList(storeSkuList, err, storeID, model.VendorChineseNames[model.VendorIDDD], syncType)
|
||||
storeSku.VendorSkuID = utils.Int2Str(storeSku.SkuID)
|
||||
|
||||
Reference in New Issue
Block a user