价格统计

This commit is contained in:
苏尹岚
2019-12-09 09:31:34 +08:00
parent 441fa5e3d8
commit 5d1f128e1d
4 changed files with 35 additions and 15 deletions

View File

@@ -36,9 +36,18 @@ func GetStatisticsReportForAfsOrders(ctx *jxcontext.Context, storeIDs []int, fro
return statisticsReportForOrdersList, err
}
func StatisticsReportForStoreSkusPrice(ctx *jxcontext.Context, cityCodes, skuIDs []int) (priceRefer []*model.PriceReferSnapshot, err error) {
func StatisticsReportForStoreSkusPrice(ctx *jxcontext.Context, cityCodes, skuIDs []int, snapDate string, offset, pageSize int) (pagedInfo *model.PagedInfo, err error) {
var snapDateParam time.Time
db := dao.GetDB()
return dao.GetPriceReferSnapshot(db, cityCodes, skuIDs)
if snapDate != "" {
snapDateParam = utils.Str2Time(snapDate)
}
priceReferSnapshot, totalCount, err := dao.GetPriceReferSnapshot(db, cityCodes, skuIDs, snapDateParam, offset, pageSize)
pagedInfo = &model.PagedInfo{
Data: priceReferSnapshot,
TotalCount: totalCount,
}
return
}
func BeginSavePriceRefer(ctx *jxcontext.Context, cityCodes, skuIDs []int) (err error) {