- debug output params info after filterStorePriceChange in updateStoresSkusWithoutSync

This commit is contained in:
gazebo
2018-12-24 09:18:11 +08:00
parent 65b4e2bcb8
commit c26ac82d72

View File

@@ -488,6 +488,7 @@ func updateStoresSkusWithoutSync(ctx *jxcontext.Context, storeIDs []int, skuBind
if storeIDs, skuBindInfos, err = filterStorePriceChange(ctx, storeIDs, skuBindInfos); err != nil {
return nil, err
}
globals.SugarLogger.Debugf("updateStoresSkusWithoutSync2, storeIDs:%v, skuBindInfos:%s", storeIDs, utils.Format4Output(skuBindInfos, false))
userName := ctx.GetUserName()
needSyncIDMap := make(map[int]int)
@@ -902,7 +903,14 @@ func CopyStoreSkus(ctx *jxcontext.Context, fromStoreID, toStoreID int, copyMode
}
func shouldPendingStorePriceChange(ctx *jxcontext.Context, storeID int, skuBindInfo *StoreSkuBindInfo) bool {
return globals.EnablePendingChange && (ctx.GetLoginType() == weixin.LoginType || ctx.GetUserName() == "fakeboss")
if globals.EnablePendingChange {
if ctx.GetLoginType() == weixin.LoginType || ctx.GetUserName() == "fakeboss" {
// storeDetail, err := dao.GetStoreDetail()
// skuBindInfo.IsFocus != 1 &&
return true
}
}
return false
}
func filterStorePriceChange(ctx *jxcontext.Context, storeIDs []int, skuBindInfos []*StoreSkuBindInfo) (filteredStoreIDs []int, filteredSkuBindInfos []*StoreSkuBindInfo, err error) {