From 6ccd0f9e28c083e5f62d7d5074a85584a77af6bb Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期二, 14 一月 2025 17:09:02 +0800 Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/qijisheng --- 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 ffbdf33..138fa96 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 @@ -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()); -- Gitblit v1.7.1