Pu Zhibing
2025-01-14 7c63ed19b08869dbea4a6ff41719c83f29dc52ea
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java
@@ -114,6 +114,9 @@
        shop.setCustomOrderNumber(0);
        shop.setAppUserId(appUser.getId());
        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);
@@ -216,9 +219,10 @@
        // 查询有没有门店绑定这个被删除的门店
        List<Shop> shops = shopService.lambdaQuery().eq(Shop::getPid, shop.getId()).list();
        for (Shop shop1 : shops) {
            shop1.setPid(0);
            LambdaUpdateWrapper<Shop> set = new LambdaUpdateWrapper<Shop>().set(Shop::getPid, null)
                    .eq(Shop::getId,shop1.getId());
            shopService.update(set);
        }
        shopService.updateBatchById(shops);
        appUserClient.clearBindShop(shop.getId());
        UserShop userShop = new UserShop();
        userShop.setShopId(shop.getId());