This commit is contained in:
邹宗楠
2024-10-10 14:38:39 +08:00
parent 0e2909d71d
commit f2f5f2be40

View File

@@ -1897,6 +1897,7 @@ func uniqueStoreNameBind(skuBindInfos []*StoreSkuBindInfo) (outSkuBindInfos []*S
}
func updateStoresSkusWithoutSync(ctx *jxcontext.Context, db *dao.DaoDB, storeIDs []int, skuBindInfos []*StoreSkuBindInfo, isScale, isRefreshHigh bool) (needSyncSkus []int, err error) {
globals.SugarLogger.Debugf("---------------------------1")
// if len(storeIDs)*len(skuBindInfos) > maxStoreNameBind2 {
// return nil, fmt.Errorf("门店商品信息大于%d", maxStoreNameBind2)
// }
@@ -1927,6 +1928,9 @@ func updateStoresSkusWithoutSync(ctx *jxcontext.Context, db *dao.DaoDB, storeIDs
}
}()
for _, storeID := range storeIDs {
if storeID == 668470 {
globals.SugarLogger.Debugf("-----------------2")
}
// todo 可以考虑在需要更新价格再获取
storeDetail, err := dao.GetStoreDetail(dao.GetDB(), storeID, model.VendorIDJX, "")
if err != nil || storeDetail == nil {
@@ -1943,6 +1947,10 @@ func updateStoresSkusWithoutSync(ctx *jxcontext.Context, db *dao.DaoDB, storeIDs
if isScale {
scaleFactor = 100 / float64(jxutils.ConstrainPayPercentage(storeDetail.PayPercentage))
}
if storeID == 668470 {
globals.SugarLogger.Debugf("-----------------3")
globals.SugarLogger.Debugf("---------skuBindInfos := %s", utils.Format4Output(skuBindInfos, false))
}
for _, skuBindInfo := range skuBindInfos {
if skuBindInfo.StoreID == 668470 {
globals.SugarLogger.Debugf("---------skuBindInfo := %s", utils.Format4Output(skuBindInfo, false))