From 9608c06bb773dd0fe3d745f9beb0fd4556925e15 Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期二, 14 一月 2025 17:09:51 +0800 Subject: [PATCH] 修改bug --- ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java | 18 ++++++++++++++++++ 1 files changed, 18 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 446cb7c..31c9504 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); @@ -364,6 +367,21 @@ } shop.setStatus(status); shopService.updateById(shop); + //处理员工等数据 + UserShop userSh = new UserShop(); + userSh.setShopId(id); + List<UserShop> data = userShopClient.getUserShop(userSh).getData(); + for (UserShop datum : data) { + UserShop userShop = new UserShop(); + userShop.setUserId(datum.getUserId()); + List<UserShop> data1 = userShopClient.getUserShop(userShop).getData(); + long count = data1.stream().filter(s -> !s.getShopId().equals(id)).count(); + if(0 == count){ + SysUser sysUser = sysUserClient.getSysUser(datum.getUserId()).getData(); + sysUser.setStatus(status == 1 ? "0" : "1"); + sysUserClient.updateUser(sysUser); + } + } return R.ok(); } -- Gitblit v1.7.1