From 125c03cf7302e6de0b1d172f64dd49a7c0400645 Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期六, 08 二月 2025 10:10:18 +0800 Subject: [PATCH] 修改门店首页统计bug --- ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java | 8 ++++++-- 1 files changed, 6 insertions(+), 2 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 23a591e..a185bbb 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 @@ -823,8 +823,12 @@ @GetMapping("/getShopStatistics") - public R<Map<String, BigDecimal> > getShopStatistics(){ - List<Shop> shopList = shopService.list(); + public R<Map<String, BigDecimal> > getShopStatistics(@RequestParam("shopId") Integer shopId){ + LambdaQueryWrapper<Shop> queryWrapper = new LambdaQueryWrapper<Shop>().eq(Shop::getDelFlag, 0).eq(Shop::getStatus, 1); + if(null != shopId){ + queryWrapper.eq(Shop::getId, shopId); + } + List<Shop> shopList = shopService.list(queryWrapper); BigDecimal serverGiveawayMoney = BigDecimal.ZERO; BigDecimal giveawayMoney = BigDecimal.ZERO; for (Shop shop : shopList) { -- Gitblit v1.7.1