From 36d417268ecb1a1ebef0798a38bc33f5d2cd6ed6 Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期二, 14 一月 2025 16:19:21 +0800 Subject: [PATCH] 修改bug --- ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java | 3 +++ ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java | 2 +- ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/RegionController.java | 4 ++-- ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianSubscribeServiceImpl.java | 6 ++++-- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java index 65ac6cf..0b072da 100644 --- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java +++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java @@ -328,7 +328,7 @@ orderPageListVo.setUserName(appUser.getName()); orderPageListVo.setPhone(appUser.getPhone()); } - RefundPass one = refundPassService.getOne(new LambdaQueryWrapper<RefundPass>().eq(RefundPass::getOrderId, orderPageListVo.getId()).eq(RefundPass::getDelFlag, 0).last(" order by create_time desc limit 0, 1")); + RefundPass one = refundPassService.getOne(new LambdaQueryWrapper<RefundPass>().eq(RefundPass::getOrderId, orderPageListVo.getId()).eq(RefundPass::getDelFlag, 0).last(" order by create_time desc limit 0,1")); orderPageListVo.setRefundPassId(null != one ? one.getId().toString() : null); } return pageInfo.setRecords(list); diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/RegionController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/RegionController.java index 0e0a518..b0954d3 100644 --- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/RegionController.java +++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/RegionController.java @@ -41,9 +41,9 @@ List<Region> list = regionService.list(); List<Region> collect = list.stream().filter(s -> s.getParentId() == 0).collect(Collectors.toList()); for (Region region : collect) { - List<Region> collect1 = list.stream().filter(s -> s.getParentId() == region.getId()).collect(Collectors.toList()); + List<Region> collect1 = list.stream().filter(s -> s.getParentId().equals(region.getId())).collect(Collectors.toList()); for (Region region1 : collect1) { - List<Region> collect2 = list.stream().filter(s -> s.getParentId() == region1.getId()).collect(Collectors.toList()); + List<Region> collect2 = list.stream().filter(s -> s.getParentId().equals(region1.getId())).collect(Collectors.toList()); region1.setChilds(collect2); } region.setChilds(collect1); 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..443d1e8 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); diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianSubscribeServiceImpl.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianSubscribeServiceImpl.java index b1df1da..193e2f6 100644 --- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianSubscribeServiceImpl.java +++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianSubscribeServiceImpl.java @@ -72,8 +72,10 @@ if(first.isPresent()){ AppUserShop appUserShop = first.get(); Technician technician = technicianService.getOne(new LambdaQueryWrapper<Technician>().eq(Technician::getAppUserId, appUserShop.getAppUserId()) - .eq(Technician::getShopId, appUserShop.getShopId()).eq(Technician::getDelFlag, 0).eq(Technician::getStatus, 1)); - technicianId = technician.getId(); + .eq(Technician::getShopId, appUserShop.getShopId()).eq(Technician::getDelFlag, 0).eq(Technician::getStatus, 2)); + if(null != technician){ + technicianId = technician.getId(); + } } List<TechnicianSubscribeVO> list = technicianSubscribeMapper.getTechnicianSubscribeByUserAndShop(pageInfo, shopId, status, technicianId); for (TechnicianSubscribeVO technicianSubscribeVO : list) { -- Gitblit v1.7.1