Pu Zhibing
2025-02-08 125c03cf7302e6de0b1d172f64dd49a7c0400645
修改门店首页统计bug
4个文件已修改
19 ■■■■■ 已修改文件
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/ShopClientFallbackFactory.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/ShopClient.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/ShopClientFallbackFactory.java
@@ -58,7 +58,7 @@
            }
            @Override
            public R<Map<String, BigDecimal>> getShopStatistics() {
            public R<Map<String, BigDecimal>> getShopStatistics(Integer shopId) {
                return R.fail();
            }
        };
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/ShopClient.java
@@ -70,5 +70,5 @@
    @GetMapping("/shop/getShopStatistics")
    public R<Map<String, BigDecimal>> getShopStatistics();
    public R<Map<String, BigDecimal>> getShopStatistics(@RequestParam("shopId") Integer shopId);
}
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java
@@ -1043,9 +1043,12 @@
                }
            }
        });
        Integer objectId = 0;
        if(sysUser.getRoleType() == 2){
            objectId = sysUser.getObjectId();
        }
        R<Map<String, BigDecimal>> shopStatistics = shopClient.getShopStatistics();
        R<Map<String, BigDecimal>> shopStatistics = shopClient.getShopStatistics(objectId);
        Map<String, BigDecimal> data = shopStatistics.getData();
        BigDecimal totalServiceFee = BigDecimal.ZERO;
        BigDecimal totalUserCommission = BigDecimal.ZERO;
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) {