This commit is contained in:
邹宗楠
2025-04-27 15:16:21 +08:00
parent a17464b5a5
commit 16a67501f3

View File

@@ -356,9 +356,12 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
PickupMethod: "0",
}
param.Name = checkNameLenght(param.Name)
if api.GetProductUpdateRule(param.CategoryLeafId) {
afterSaleService := api.GetProductUpdateRule(param.CategoryLeafId)
globals.SugarLogger.Debugf("----------afterSaleService-%s", utils.Format4Output(afterSaleService, false))
if afterSaleService {
param.AfterSaleService = map[string]string{"supply_day_return_selector": "7天"}
}
globals.SugarLogger.Debugf("----------param1-%s", utils.Format4Output(param, false))
// 暂时只考虑修改白底图,提高效率.其余图片不做修改
img, descImg, whiteImg, err := GetTiktokImgList(api, utils.Int2Str(storeSku.StoreID), storeSku.SkuID, storeSku.DescImg, storeSku.Img, []string{storeSku.Img2, storeSku.Img3, storeSku.Img4, storeSku.Img5})
if err != nil {
@@ -438,7 +441,7 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
//param.MainProductId = mainIdInt
//param.FreightId, _ = api.GetStoreBindTemp(utils.Str2Int64(vendorStoreID))
param.SpecPrices = GetSpecPrices(param.Specs, vendorStoreID, mainIdInt, storeSku)
globals.SugarLogger.Debugf("--------param := %s", utils.Format4Output(param, false))
globals.SugarLogger.Debugf("--------param2 := %s", utils.Format4Output(param, false))
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)