luodangjia
2024-12-17 ce7f72ff0a44cb6e980b05a538a0339439248b99
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShopPointServiceImpl.java
@@ -40,17 +40,18 @@
        String shopName = shopPoint.getShopName();
        String phone = shopPoint.getPhone();
        String shopLeaderName = shopPoint.getShopLeaderName();
        if (StringUtils.isNotEmpty(shopName) || StringUtils.isNotEmpty(phone) || StringUtils.isNotEmpty(shopLeaderName)) {
            List<Integer> shopIds = shopService.listObjs(new LambdaQueryWrapper<Shop>()
                            .select(Shop::getId)
                            .like(StringUtils.isNotEmpty(shopName), Shop::getName, shopName)
                            .like(StringUtils.isNotEmpty(phone), Shop::getPhone, phone)
                            .like(StringUtils.isNotEmpty(shopLeaderName), Shop::getShopManager, shopLeaderName))
                    .stream().map(o -> (Integer) o).collect(Collectors.toList());
            shopPoint.setShopIds(shopIds);
        List<Integer> shopIds = shopService.listObjs(new LambdaQueryWrapper<Shop>()
                        .select(Shop::getId)
                        .like(StringUtils.isNotEmpty(shopName), Shop::getName, shopName)
                        .like(StringUtils.isNotEmpty(phone), Shop::getPhone, phone)
                        .like(StringUtils.isNotEmpty(shopLeaderName), Shop::getShopManager, shopLeaderName))
                .stream().map(o -> (Integer) o).collect(Collectors.toList());
        if (CollectionUtils.isEmpty(shopIds)) {
            return new ShopPointStatistics();
        }
        shopPoint.setShopIds(shopIds);
        ShopPointStatistics shopPointStatistics = new ShopPointStatistics();
        List<ShopPoint> latestChangeByType = shopPointMapper.findLatestChangeByType(shopPoint);