This commit is contained in:
邹宗楠
2024-03-19 11:01:26 +08:00
parent 9ca611242f
commit ed9a1ace36
2 changed files with 5 additions and 5 deletions

View File

@@ -621,14 +621,14 @@ func (c *PurchaseHandler) CanSwitch2SelfDeliver(order *model.GoodsOrder) (isCan
// Swtich2SelfDeliver 抖音转自送的时候就是通知抖音发货了 // Swtich2SelfDeliver 抖音转自送的时候就是通知抖音发货了
func (c *PurchaseHandler) Swtich2SelfDeliver(order *model.GoodsOrder, userName string) (err error) { 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) remoteWaybill, _ := c.GetDYPSRiderInfo(order.VendorOrderID)
if remoteWaybill != nil { if remoteWaybill != nil {
if remoteWaybill.Status >= tiktokShop.ShipmentStatusArrived && remoteWaybill.Status != tiktokShop.ShipmentStatusCanceled { //骑手取货后不可取消 if remoteWaybill.Status >= tiktokShop.ShipmentStatusArrived && remoteWaybill.Status != tiktokShop.ShipmentStatusCanceled { //骑手取货后不可取消
return errors.New("抖音配送骑手已取货,不可转门店自配送/三方配送") return errors.New("抖音配送骑手已取货,不可转门店自配送/三方配送")
} }
if remoteWaybill.Status < tiktokShop.ShipmentStatusArrived /*|| remoteWaybill.Status == tiktokShop.ShipmentStatusCanceled */ { //存在运单 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 return err
} }
} }
@@ -646,7 +646,7 @@ func (c *PurchaseHandler) Swtich2SelfDeliver(order *model.GoodsOrder, userName s
} }
logisticsAdd.CompanyCode = tiktokShop.JxVendorId2TiktokCode(order.WaybillVendorID) logisticsAdd.CompanyCode = tiktokShop.JxVendorId2TiktokCode(order.WaybillVendorID)
//转门店自送通知抖音发货 //转门店自送通知抖音发货
return api.OrderDelivering(logisticsAdd) return apiObj.OrderDelivering(logisticsAdd)
} }
// Swtich2SelfDelivered 暂无自送完成 // Swtich2SelfDelivered 暂无自送完成

View File

@@ -406,9 +406,9 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
// 修改商品 // 修改商品
param.ProductId = mainIdInt param.ProductId = mainIdInt
param.MainProductId = mainIdInt //param.MainProductId = mainIdInt
//param.FreightId, _ = api.GetStoreBindTemp(utils.Str2Int64(vendorStoreID)) //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(), "您上传的商品主图存在重复") { if err := api.EditStoreCommodity(param); err != nil && !strings.Contains(err.Error(), "您上传的商品主图存在重复") {
failedList = putils.GetErrMsg2FailedSingleList(storeSkuList, err, storeID, model.VendorChineseNames[model.VendorIDDD], syncType) failedList = putils.GetErrMsg2FailedSingleList(storeSkuList, err, storeID, model.VendorChineseNames[model.VendorIDDD], syncType)
storeSku.VendorSkuID = utils.Int2Str(storeSku.SkuID) storeSku.VendorSkuID = utils.Int2Str(storeSku.SkuID)