From eb428cb6839049970e67264f4eafc612e5bcaa38 Mon Sep 17 00:00:00 2001
From: Pu Zhibing <393733352@qq.com>
Date: 星期二, 18 三月 2025 15:14:20 +0800
Subject: [PATCH] 修改统计bug
---
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java
index 0f9e61e..ac90511 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java
@@ -702,9 +702,7 @@
@ApiOperation(value = "门店统计", tags = {"管理后台-首页统计"})
public R<ShopStatistics> shopStatistics(@ApiParam("门店id") Integer shopId) {
ShopStatistics shopStatistics = shopMapper.getShopStatistics(shopId);
- List<Integer> shopIds;
-
- shopIds = shopService.list(new LambdaQueryWrapper<Shop>()
+ List<Integer> shopIds = shopService.list(new LambdaQueryWrapper<Shop>()
.eq(Shop::getDelFlag, 0)
.eq(shopId !=null,Shop::getId, shopId))
.stream()
@@ -898,7 +896,7 @@
BigDecimal giveawayMoney = BigDecimal.ZERO;
for (Shop shop : shopList) {
serverGiveawayMoney = serverGiveawayMoney.add(shop.getServerGiveawayMoney());
- giveawayMoney = giveawayMoney.add(shop.getGiveawayMoney());
+ giveawayMoney = giveawayMoney.add(shop.getGiveawayMoney().add(shop.getLowerLevelGiveawayMoney()));
}
Map<String, BigDecimal> map = new HashMap<>();
map.put("serverGiveawayMoney", serverGiveawayMoney);
--
Gitblit v1.7.1