1
This commit is contained in:
@@ -579,11 +579,11 @@ func ModifyPetOrderSkusStock(db *dao.DaoDB, order *model.GoodsOrder, isAdd bool)
|
|||||||
dao.UpdateEntity(db, ss, "Stock", "UpdatedAt")
|
dao.UpdateEntity(db, ss, "Stock", "UpdatedAt")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if _, err = cms.CurVendorSync.SyncStoresSkus2(jxcontext.AdminCtx, nil, 0, db, nil, storeIdList, false, skuIDList, nil, model.SyncFlagStockMask, true, true); err != nil {
|
if hit, err := cms.CurVendorSync.SyncStoresSkus2(jxcontext.AdminCtx, nil, 0, db, nil, storeIdList, false, skuIDList, nil, model.SyncFlagStockMask, true, true); err != nil {
|
||||||
globals.SugarLogger.Debugf("----ModifyPetOrderSkusStock Update err opther: %v", err)
|
globals.SugarLogger.Debugf("----ModifyPetOrderSkusStock Update err opther: %v , %s", err, hit)
|
||||||
}
|
}
|
||||||
if _, err = cms.SyncSkus(jxcontext.AdminCtx, nil, nil, []string{"309558"}, nil, skuIDList, true); err != nil {
|
if hit, err := cms.SyncSkus(jxcontext.AdminCtx, nil, nil, []string{"309558"}, nil, skuIDList, true); err != nil {
|
||||||
globals.SugarLogger.Debugf("----ModifyPetOrderSkusStock Update err jd: %v", err)
|
globals.SugarLogger.Debugf("----ModifyPetOrderSkusStock Update err jd: %v,%s", err, hit)
|
||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2200,12 +2200,15 @@ func updateStoresSkusWithoutSync(ctx *jxcontext.Context, db *dao.DaoDB, storeIDs
|
|||||||
setStoreSkuBindStatus(skuBind, model.SyncFlagSaleMask)
|
setStoreSkuBindStatus(skuBind, model.SyncFlagSaleMask)
|
||||||
setStoreSkuBindStatus(skuBind, model.SyncFlagStockMask)
|
setStoreSkuBindStatus(skuBind, model.SyncFlagStockMask)
|
||||||
if tmpStatus == model.StoreSkuBindStatusNormal {
|
if tmpStatus == model.StoreSkuBindStatusNormal {
|
||||||
if skuBind.Stock == 0 && beego.BConfig.RunMode != model.ServerTypePet {
|
switch beego.BConfig.RunMode {
|
||||||
|
case model.ServerTypePet:
|
||||||
|
if inSkuBind.Stock != nil {
|
||||||
|
skuBind.Stock = *inSkuBind.Stock
|
||||||
|
} else {
|
||||||
|
skuBind.Stock = 0
|
||||||
|
}
|
||||||
|
default:
|
||||||
skuBind.Stock = model.MaxStoreSkuStockQty
|
skuBind.Stock = model.MaxStoreSkuStockQty
|
||||||
} else if inSkuBind != nil {
|
|
||||||
skuBind.Stock = *inSkuBind.Stock
|
|
||||||
} else {
|
|
||||||
skuBind.Stock = 0
|
|
||||||
}
|
}
|
||||||
//下面这段很难受
|
//下面这段很难受
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user