门店价格修改

This commit is contained in:
苏尹岚
2019-12-13 10:49:29 +08:00
parent 9717defad6
commit 147a683177
7 changed files with 21 additions and 22 deletions

View File

@@ -2544,14 +2544,10 @@ func GetStorePriceScore(ctx *jxcontext.Context, storeIDs []int, fromScore, toSco
return pagedInfo, err
}
func CreateStorePriceScore(ctx *jxcontext.Context, forRefresh bool) (err error) {
func CreateStorePriceScore(ctx *jxcontext.Context) (err error) {
db := dao.GetDB()
var snapshotAt time.Time
if forRefresh {
snapshotAt = utils.Time2Date(time.Now().AddDate(0, 0, -1))
} else {
snapshotAt = utils.Time2Date(time.Now())
}
snapshotAt = utils.Time2Date(time.Now().AddDate(0, 0, -1))
storePriceScoreSnapshot, err := dao.GetStorePriceScoreSnapshot(db, snapshotAt)
if len(storePriceScoreSnapshot) > 0 {
dao.Begin(db)

View File

@@ -2155,7 +2155,7 @@ func RefershStoreSkusMidPrice(ctx *jxcontext.Context, storeIDs []int) (err error
db := dao.GetDB()
_, err = dao.RefershStoreSkusMidPrice(db, storeIDs)
if err == nil {
CreateStorePriceScore(ctx, true)
CreateStorePriceScore(ctx)
}
return err
}