门店价格修改
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user