- must SkuFixedStatusOffline and then SkuFixedStatusDeleted when del spu
This commit is contained in:
@@ -410,8 +410,8 @@ func (p *PurchaseHandler) syncSkuNameAsSpu(db *dao.DaoDB, sku *model.Sku, skuExt
|
|||||||
if count.Ct <= 1 && sku.JdSyncStatus&model.SyncFlagDeletedMask != 0 { // 1就是最后删的那个
|
if count.Ct <= 1 && sku.JdSyncStatus&model.SyncFlagDeletedMask != 0 { // 1就是最后删的那个
|
||||||
updateFields = append(updateFields, model.FieldJdSyncStatus)
|
updateFields = append(updateFields, model.FieldJdSyncStatus)
|
||||||
if globals.EnableStoreWrite {
|
if globals.EnableStoreWrite {
|
||||||
if err = api.JdAPI.UpdateSpu(utils.Int2Str(skuExt.ID), utils.Params2Map(jdapi.KeyFixedStatus, jdapi.SkuFixedStatusOffline|jdapi.SkuFixedStatusDeleted)); err == nil {
|
if err = api.JdAPI.UpdateSpu(utils.Int2Str(skuExt.ID), utils.Params2Map(jdapi.KeyFixedStatus, jdapi.SkuFixedStatusOffline)); err == nil {
|
||||||
// err = api.JdAPI.UpdateSpu(utils.Int2Str(skuExt.ID), utils.Params2Map(jdapi.KeyFixedStatus, jdapi.SkuFixedStatusDeleted))
|
err = api.JdAPI.UpdateSpu(utils.Int2Str(skuExt.ID), utils.Params2Map(jdapi.KeyFixedStatus, jdapi.SkuFixedStatusDeleted))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user