首页统计排序优化
This commit is contained in:
parent
83c86ab1da
commit
571bc0ed93
@ -46,6 +46,7 @@ public class GoodsStatisticsDataServiceImpl extends ServiceImpl<GoodsStatisticsD
|
||||
queryWrapper.eq(!StringUtils.isEmpty(goodsStatisticsQueryParam.getStoreId()), "store_id", goodsStatisticsQueryParam.getStoreId());
|
||||
//查询前X记录
|
||||
Page page = new Page<GoodsStatisticsDataVO>(1, num);
|
||||
|
||||
return goodsStatisticsDataMapper.getGoodsStatisticsData(page, queryWrapper);
|
||||
}
|
||||
|
||||
@ -67,10 +68,10 @@ public class GoodsStatisticsDataServiceImpl extends ServiceImpl<GoodsStatisticsD
|
||||
queryWrapper.between("create_time", date[0], date[1]);
|
||||
|
||||
//判断是按照数量统计还是按照金额统计
|
||||
if (goodsStatisticsQueryParam.getType().equals(StatisticsQuery.NUM.name())) {
|
||||
queryWrapper.orderByDesc("num");
|
||||
} else {
|
||||
if (goodsStatisticsQueryParam.getType().equals(StatisticsQuery.PRICE.name())) {
|
||||
queryWrapper.orderByDesc("price");
|
||||
} else {
|
||||
queryWrapper.orderByDesc("num");
|
||||
}
|
||||
//设置为付款查询
|
||||
queryWrapper.eq("flow_type", FlowTypeEnum.PAY.name());
|
||||
|
Loading…
x
Reference in New Issue
Block a user