luodangjia
2025-01-14 e9d5d32c7ee67eec2f47ed80fe9aae92a0ce7ec1
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java
@@ -260,6 +260,9 @@
            }
        }
        String city = TencentMapUtil.inverseGeographicalAnalysis(shop.getLongitude(), shop.getLatitude(), false);
        if(!StringUtils.hasLength(city)){
            city = "510100";
        }
        shop.setProvinceCode(city.substring(0, 2) + "0000");
        shop.setCityCode(city.substring(0, 4) + "00");
        shop.setDistrictCode(city);
@@ -437,7 +440,12 @@
                return R.ok(new ArrayList<>());
            }
            List<Integer> shopIds = appUserShopList.stream().map(AppUserShop::getShopId).collect(Collectors.toList());
            List<Shop> shopList = shopService.list(new LambdaQueryWrapper<Shop>().in(Shop::getId, shopIds).eq(Shop::getDelFlag, 0).eq(Shop::getStatus, 1));
            List<Shop> shopList = shopService.list(new LambdaQueryWrapper<Shop>().in(Shop::getId, shopIds).eq(Shop::getDelFlag, 0));
            long count = shopList.stream().filter(s -> s.getStatus() == 1).count();
            if(shopList.size() > 0 && count == 0){
                return R.fail("操作失败,当前门店已冻结");
            }
            shopList = shopList.stream().filter(s -> s.getStatus() == 1).collect(Collectors.toList());
            if(null != appUser.getShopId()){
                Optional<Shop> first = shopList.stream().filter(s -> s.getId().equals(appUser.getShopId())).findFirst();
                if(first.isPresent()){