- stToToCount
This commit is contained in:
@@ -318,6 +318,8 @@ func GetStoreSkus(ctx *jxcontext.Context, storeID int, isFocus bool, keyword str
|
||||
}
|
||||
|
||||
func GetStoresSkusSaleInfo(ctx *jxcontext.Context, storeIDs []int, skuIDs []int, fromTime, toTime time.Time, fromCount, toCount int) (saleInfoList []*SkuSaleInfo, err error) {
|
||||
globals.SugarLogger.Debugf("GetStoresSkusSaleInfo storeIDs:%v, fromTime:%v, toTime:%v, fromCount:%d, toCount:%d", storeIDs, fromTime, toTime, fromCount, toCount)
|
||||
|
||||
db := dao.GetDB()
|
||||
sql := `
|
||||
SELECT IF(t2.jx_store_id <> 0, jx_store_id, store_id) store_id, t1.sku_id, COUNT(*) times, SUM(count) count
|
||||
|
||||
@@ -33,7 +33,7 @@ type StoreSkuController struct {
|
||||
// @Param stFromTime query string false "统计SKU开始时间"
|
||||
// @Param stToTime query string false "统计SKU结束时间"
|
||||
// @Param stFromCount query int false "统计SKU,结果集起始数量(包括)"
|
||||
// @Param stToToCount query int false "统计SKU,结果集结束数量(包括)"
|
||||
// @Param stToCount query int false "统计SKU,结果集结束数量(包括)"
|
||||
// @Param offset query int false "门店列表起始序号(以0开始,缺省为0)"
|
||||
// @Param pageSize query int false "门店列表页大小(缺省为50,-1表示全部)"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
@@ -184,7 +184,7 @@ func (c *StoreSkuController) UpdateStoresSkusSale() {
|
||||
// @Param stFromTime query string true "统计SKU开始时间"
|
||||
// @Param stToTime query string false "统计SKU结束时间"
|
||||
// @Param stFromCount query int false "统计SKU,结果集起始数量(包括)"
|
||||
// @Param stToToCount query int false "统计SKU,结果集结束数量(包括)"
|
||||
// @Param stToCount query int false "统计SKU,结果集结束数量(包括)"
|
||||
// @Param offset query int false "门店列表起始序号(以0开始,缺省为0)"
|
||||
// @Param pageSize query int false "门店列表页大小(缺省为50,-1表示全部)"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
@@ -207,9 +207,9 @@ func (c *StoreSkuController) GetStoresSkusSaleInfo() {
|
||||
return retVal, "", err
|
||||
}
|
||||
if params.MapData["stToToCount"] == nil {
|
||||
params.StToToCount = math.MaxInt32
|
||||
params.StToCount = math.MaxInt32
|
||||
}
|
||||
retVal, err = cms.GetStoresSkusSaleInfo(params.Ctx, storeIDs, skuIDs, timeList[0], timeList[1], params.StFromCount, params.StToToCount)
|
||||
retVal, err = cms.GetStoresSkusSaleInfo(params.Ctx, storeIDs, skuIDs, timeList[0], timeList[1], params.StFromCount, params.StToCount)
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user