1
This commit is contained in:
@@ -272,7 +272,6 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
|
||||
Weight: utils.Int2Float64(storeSku.Weight),
|
||||
DeliveryDelayDay: tiktokShop.DeliveryDelayDayToDay,
|
||||
PresellType: tiktokShop.SendGoodsTypeNow,
|
||||
Supply7dayReturn: 0,
|
||||
Mobile: storeDetail.Tel1,
|
||||
Commit: true,
|
||||
Specs: "重量|" + utils.Float64ToStr(float64(storeSku.SpecQuality)) + storeSku.SpecUnit,
|
||||
@@ -284,6 +283,12 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
|
||||
Name: param.Name,
|
||||
ProductFormatNew: param.ProductFormatNew,
|
||||
}
|
||||
// 是否支持七天无理由
|
||||
if api.GetProductUpdateRule(param.CategoryLeafId) {
|
||||
param.Supply7dayReturn = 1
|
||||
} else {
|
||||
param.Supply7dayReturn = 0
|
||||
}
|
||||
updateParam.Pic = param.Pic
|
||||
updateParam.Description = param.Description
|
||||
updateParam.WeightUnit = tiktokShop.WeightUint_G
|
||||
@@ -343,7 +348,6 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
|
||||
Weight: utils.Int2Float64(storeSku.Weight),
|
||||
DeliveryDelayDay: tiktokShop.DeliveryDelayDayToDay,
|
||||
PresellType: tiktokShop.SendGoodsTypeNow,
|
||||
Supply7dayReturn: 0,
|
||||
Mobile: storeDetail.Tel1,
|
||||
Commit: true,
|
||||
Specs: "重量|" + utils.Float64ToStr(float64(storeSku.SpecQuality)) + storeSku.SpecUnit,
|
||||
@@ -353,7 +357,11 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
|
||||
PickupMethod: "0",
|
||||
}
|
||||
param.Name = checkNameLenght(param.Name)
|
||||
|
||||
if api.GetProductUpdateRule(param.CategoryLeafId) {
|
||||
param.Supply7dayReturn = 1
|
||||
} else {
|
||||
param.Supply7dayReturn = 0
|
||||
}
|
||||
// 暂时只考虑修改白底图,提高效率.其余图片不做修改
|
||||
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 {
|
||||
@@ -457,7 +465,6 @@ func makeMainProductSku(db *dao.DaoDB, api *tiktokShop.API, storeSku *dao.StoreS
|
||||
Weight: utils.Int2Float64(storeSku.Weight),
|
||||
DeliveryDelayDay: tiktokShop.DeliveryDelayDayToDay,
|
||||
PresellType: tiktokShop.SendGoodsTypeNow,
|
||||
Supply7dayReturn: 0, // 是否支持7天无理由,0不支持,1支持,2支持(拆封后不支持)
|
||||
Mobile: storeDetail.Tel1,
|
||||
Commit: true,
|
||||
Specs: "重量|" + utils.Float64ToStr(float64(storeSku.SpecQuality)) + storeSku.SpecUnit,
|
||||
@@ -1106,6 +1113,9 @@ func MakeProductFormatNew(api *tiktokShop.API, skuNameId int64, categoryLeafId i
|
||||
} else if v.PropertyName == "产地" {
|
||||
options = append(options, map[string]interface{}{"name": v.PropertyName, "value": 13850, "diy_type": v.DiyType})
|
||||
categoryMap[utils.Int64ToStr(v.PropertyId)] = options
|
||||
} else if v.PropertyName == "生鲜储存温度" {
|
||||
options = append(options, map[string]interface{}{"name": v.PropertyName, "value": 2808, "diy_type": v.DiyType})
|
||||
categoryMap[utils.Int64ToStr(v.PropertyId)] = options
|
||||
} else if len(v.Options) == 0 {
|
||||
options = append(options, map[string]interface{}{"name": v.PropertyName, "value": 0, "diy_type": v.DiyType})
|
||||
categoryMap[utils.Int64ToStr(v.PropertyId)] = options
|
||||
|
||||
Reference in New Issue
Block a user