1
This commit is contained in:
@@ -216,6 +216,12 @@ func skuInfo2Param(ctx *jxcontext.Context, sku *dao.StoreSkuSyncInfo) (param *jd
|
||||
if sku.DescImg != "" {
|
||||
param.ProductDesc = fmt.Sprintf(`<img src="%s" alt="一张图片" />`, sku.DescImg)
|
||||
}
|
||||
|
||||
switch sku.NameID {
|
||||
case 8080661, 8080665, 8080667, 8080670:
|
||||
globals.SugarLogger.Debugf("--------param := %s", utils.Format4Output(param, false))
|
||||
}
|
||||
|
||||
return param
|
||||
}
|
||||
|
||||
@@ -223,6 +229,10 @@ func (p *PurchaseHandler) CreateSku2(ctx *jxcontext.Context, sku *dao.StoreSkuSy
|
||||
param := skuInfo2Param(ctx, sku)
|
||||
if globals.EnableJdStoreWrite {
|
||||
sku.VendorSkuID, err = getAPI(sku.VendorOrgCode).AddSku2(param)
|
||||
switch sku.NameID {
|
||||
case 8080661, 8080665, 8080667, 8080670:
|
||||
globals.SugarLogger.Debugf("--------err := %v", utils.Format4Output(err, false))
|
||||
}
|
||||
if err != nil && strings.Contains(err.Error(), jdapi.ErrMustUPC) {
|
||||
result, err2 := getAPI(sku.VendorOrgCode).BatchAddSkuByUPC([]*jdapi.CreateByUpcParam2{
|
||||
&jdapi.CreateByUpcParam2{
|
||||
|
||||
Reference in New Issue
Block a user