Store.ChangePriceType新增StoreChangePriceTypeManagedStore

This commit is contained in:
gazebo
2019-11-11 10:11:43 +08:00
parent 83f9493352
commit f710444cbf
4 changed files with 26 additions and 11 deletions

View File

@@ -97,6 +97,7 @@ func InitServiceInfo(version string, buildTime time.Time, gitCommit string) {
"configTypeName": model.ConfigTypeName,
"autoSaleAt": AutoSaleAtStr,
"userTypeName": model.UserTypeName,
"storePriceTypeName": model.StorePriceTypeName,
},
}
}

View File

@@ -988,7 +988,7 @@ func updateStoresSkusWithoutSync(ctx *jxcontext.Context, db *dao.DaoDB, storeIDs
for _, v := range allBinds {
var num int64
inSkuBind := inSkuBinsMap[v.RealSkuID]
isCanChangePrice := (isUserCanDirectChangePrice || v.ChangePriceType != model.StoreChangePriceTypeBossDisabled)
isCanChangePrice := (isUserCanDirectChangePrice || jxutils.TranslateStorePriceType(v.ChangePriceType) != model.StoreChangePriceTypeBossDisabled)
// globals.SugarLogger.Debug(utils.Format4Output(inSkuBind, false))
var skuBind *model.StoreSkuBind
if v.ID == 0 {
@@ -1448,7 +1448,7 @@ func shouldPendingStorePriceChange(ctx *jxcontext.Context, storeID int, skuBindI
if err = dao.GetEntity(db, store); err != nil {
return false, err
}
return store.ChangePriceType == model.StoreChangePriceTypeNeedApprove, nil
return jxutils.TranslateStorePriceType(store.ChangePriceType) == model.StoreChangePriceTypeNeedApprove, nil
}
}
return false, nil