店铺首页统计bug代码修复
This commit is contained in:
parent
d8da258898
commit
343e5e332c
@ -28,13 +28,6 @@ public interface OrderStatisticsService extends IService<Order> {
|
||||
*/
|
||||
OrderOverviewVO overview(StatisticsQueryParam statisticsQueryParam);
|
||||
|
||||
/**
|
||||
* 查询订单统计金额
|
||||
*
|
||||
* @return 订单统计
|
||||
*/
|
||||
Map<String, Object> getStoreOrderStatisticsPrice();
|
||||
|
||||
/**
|
||||
* 获取订单总数量
|
||||
*
|
||||
|
@ -183,7 +183,7 @@ public class IndexStatisticsServiceImpl implements IndexStatisticsService {
|
||||
//商品总数量
|
||||
storeIndexStatisticsVO.setGoodsNum(goodsStatisticsService.goodsNum(GoodsStatusEnum.UPPER, null));
|
||||
//订单总数量、订单总金额
|
||||
Map<String, Object> map = orderStatisticsService.getStoreOrderStatisticsPrice();
|
||||
Map<String, Object> map = storeFlowStatisticsService.getOrderStatisticsPrice();
|
||||
storeIndexStatisticsVO.setOrderNum(Convert.toInt(map.get("num").toString()));
|
||||
storeIndexStatisticsVO.setOrderPrice(map.get("price") != null ? Double.parseDouble(map.get("price").toString()) : 0.0);
|
||||
|
||||
|
@ -94,16 +94,6 @@ public class OrderStatisticsServiceImpl extends ServiceImpl<OrderStatisticsMappe
|
||||
orderOverviewVO.setOverallConversionRate(CurrencyUtil.mul(overallConversionRate, 100) + "%");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getStoreOrderStatisticsPrice() {
|
||||
QueryWrapper queryWrapper = new QueryWrapper();
|
||||
queryWrapper.eq(StringUtils.equals(UserContext.getCurrentUser().getRole().name(), UserEnums.STORE.name()),
|
||||
"store_id", UserContext.getCurrentUser().getStoreId());
|
||||
queryWrapper.select("SUM(final_price) AS price , COUNT(0) AS num");
|
||||
return this.getMap(queryWrapper);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Integer orderNum(String orderStatus) {
|
||||
LambdaQueryWrapper<Order> queryWrapper = new LambdaQueryWrapper();
|
||||
|
Loading…
x
Reference in New Issue
Block a user