1
This commit is contained in:
@@ -2000,9 +2000,6 @@ func updateStoresSkusWithoutSync(ctx *jxcontext.Context, db *dao.DaoDB, storeIDs
|
||||
for _, v := range inSkuBinds {
|
||||
inSkuBinsMap[v.SkuID] = v
|
||||
}
|
||||
if storeID == 668470 {
|
||||
globals.SugarLogger.Debugf("------------inSkuBinsMap := %s", utils.Format4Output(inSkuBinsMap, false))
|
||||
}
|
||||
unitPrice := 0
|
||||
if skuBindInfo.UnitPrice != 0 {
|
||||
if skuBindInfo.UnitPrice > MaxSkuUnitPrice {
|
||||
@@ -2399,6 +2396,7 @@ func formatAutoSaleTime(autoSaleTime time.Time) (outAutoSaleTime time.Time) {
|
||||
|
||||
// todo 应该用updateStoresSkusWithoutSync实现
|
||||
func updateStoreSkusSaleWithoutSync(ctx *jxcontext.Context, storeID int, skuBindSkuInfos []*StoreSkuBindSkuInfo, autoSaleTime time.Time, ignoreDontSale bool, userName string) (needSyncSkus []int, err error) {
|
||||
globals.SugarLogger.Debugf("------skuBindSkuInfos := %s", utils.Format4Output(skuBindSkuInfos, false))
|
||||
var num int64
|
||||
db := dao.GetDB()
|
||||
needSyncIDMap := make(map[int]int)
|
||||
@@ -2417,6 +2415,7 @@ func updateStoreSkusSaleWithoutSync(ctx *jxcontext.Context, storeID int, skuBind
|
||||
}
|
||||
}()
|
||||
storeSkuList, err := dao.GetStoresSkusInfo(db, []int{storeID}, jxutils.IntMap2List(skuIDMap))
|
||||
globals.SugarLogger.Debugf("------storeSkuList := %s", utils.Format4Output(storeSkuList, false))
|
||||
if err != nil {
|
||||
dao.Rollback(db, txDB)
|
||||
return nil, err
|
||||
@@ -3684,6 +3683,7 @@ func AutoSaleStoreSku(ctx *jxcontext.Context, storeIDs []int, isNeedSync bool) (
|
||||
}
|
||||
}
|
||||
if isNeedSync && len(skuIDs) > 0 {
|
||||
globals.SugarLogger.Debugf("-----AutoSaleStoreSku := %d,%s", storeIDs, utils.Format4Output(skuIDs, false))
|
||||
if _, err = CurVendorSync.SyncStoresSkus(ctx, nil, model.SyncFlagSaleMask, db, nil, []int{storeID}, skuIDs, true, true, true); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user