From 5fce4e825f5d1726a4202f6cb8b659cbf7fb52e2 Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期二, 14 一月 2025 16:28:51 +0800 Subject: [PATCH] 修改bug --- ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java | 8 ++++++++ 1 files changed, 8 insertions(+), 0 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 47416d8..446cb7c 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 @@ -211,7 +211,15 @@ } Shop shop = shopService.getById(id); shop.setDelFlag(1); + shopService.updateById(shop); + // 查询有没有门店绑定这个被删除的门店 + List<Shop> shops = shopService.lambdaQuery().eq(Shop::getPid, shop.getId()).list(); + for (Shop shop1 : shops) { + LambdaUpdateWrapper<Shop> set = new LambdaUpdateWrapper<Shop>().set(Shop::getPid, null) + .eq(Shop::getId,shop1.getId()); + shopService.update(set); + } appUserClient.clearBindShop(shop.getId()); UserShop userShop = new UserShop(); userShop.setShopId(shop.getId()); -- Gitblit v1.7.1