aa
This commit is contained in:
@@ -1253,7 +1253,6 @@ func updateStoresSkusWithoutSync(ctx *jxcontext.Context, db *dao.DaoDB, storeIDs
|
||||
// if err = checkStoresSkusSaleCity(ctx, db, storeIDs, skuBindInfos); err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
globals.SugarLogger.Debugf("updateStoresSkusWithoutSync2, storeIDs:%v, skuBindInfos:%s", storeIDs, utils.Format4Output(skuBindInfos, false))
|
||||
isUserCanDirectChangePrice := true
|
||||
if user := ctx.GetFullUser(); user != nil {
|
||||
isUserCanDirectChangePrice = user.Type&model.UserTypeOperator != 0
|
||||
@@ -1275,6 +1274,7 @@ func updateStoresSkusWithoutSync(ctx *jxcontext.Context, db *dao.DaoDB, storeIDs
|
||||
if err != nil || storeDetail == nil {
|
||||
continue
|
||||
}
|
||||
globals.SugarLogger.Debugf("updateStoresSkusWithoutSync, step 0")
|
||||
if beego.BConfig.RunMode == "prod" || beego.BConfig.RunMode == "beta" {
|
||||
if len(storeIDs) > 1 {
|
||||
if storeDetail.StoreLevel == "D" || storeDetail.StoreLevel == "E" {
|
||||
@@ -1282,10 +1282,12 @@ func updateStoresSkusWithoutSync(ctx *jxcontext.Context, db *dao.DaoDB, storeIDs
|
||||
}
|
||||
}
|
||||
}
|
||||
globals.SugarLogger.Debugf("updateStoresSkusWithoutSync, step 1")
|
||||
scaleFactor := float64(1)
|
||||
if isScale {
|
||||
scaleFactor = 100 / float64(jxutils.ConstrainPayPercentage(storeDetail.PayPercentage))
|
||||
}
|
||||
globals.SugarLogger.Debugf("updateStoresSkusWithoutSync, step 2")
|
||||
for _, skuBindInfo := range skuBindInfos {
|
||||
// 关注且没有给价时,需要尝试从store_sku_bind中得到已有的单价
|
||||
needGetExistingUnitPrice := skuBindInfo.UnitPrice == 0 && skuBindInfo.IsFocus == 1
|
||||
@@ -1345,7 +1347,7 @@ func updateStoresSkusWithoutSync(ctx *jxcontext.Context, db *dao.DaoDB, storeIDs
|
||||
// globals.SugarLogger.Debug(sql)
|
||||
if err = dao.GetRows(db, &allBinds, sql, sqlParams...); err == nil {
|
||||
if len(allBinds) > 0 {
|
||||
// globals.SugarLogger.Debug(utils.Format4Output(allBinds, false))
|
||||
globals.SugarLogger.Debug(utils.Format4Output(allBinds, true))
|
||||
inSkuBinsMap := make(map[int]*StoreSkuBindSkuInfo, len(inSkuBinds))
|
||||
for _, v := range inSkuBinds {
|
||||
inSkuBinsMap[v.SkuID] = v
|
||||
|
||||
Reference in New Issue
Block a user