From fd7b8fb7c89832c28a838b0449bbb8a392433ee2 Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期二, 22 四月 2025 14:33:02 +0800 Subject: [PATCH] 将华为云短信替换成阿里云短信 --- ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianSubscribeServiceImpl.java | 16 +++++++++++----- 1 files changed, 11 insertions(+), 5 deletions(-) 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 7d3d092..3b4d4f5 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 @@ -109,19 +109,25 @@ PageInfo<TechnicianSubscribeVO> pageInfo = new PageInfo(pageCurr, pageSize); List<TechnicianSubscribeVO> technicianSubscribeByUserAndShop1 = technicianSubscribeMapper.getTechnicianSubscribeByUserAndShop1(pageInfo, shopId, status, phone, name, serviceMode); if (StringUtils.isNotEmpty(name)){ - List<AppUser> nameIds = appUserClient.getAppUserByPhone(name).getData(); - technicianSubscribeByUserAndShop1 = technicianSubscribeByUserAndShop1.stream().filter(e -> nameIds.contains(e.getAppUserId())) + List<AppUser> nameIds = appUserClient.getAppUserByName(name).getData(); + List<Long> collect = nameIds.stream().map(AppUser::getId).collect(Collectors.toList()); + if (collect.isEmpty())collect.add(-1L); + technicianSubscribeByUserAndShop1 = technicianSubscribeByUserAndShop1.stream().filter(e -> collect.contains(e.getAppUserId())) .collect(Collectors.toList()); } if (StringUtils.isNotEmpty(phone)){ List<AppUser> phoneIds = appUserClient.getAppUserByPhone(phone).getData(); - technicianSubscribeByUserAndShop1 = technicianSubscribeByUserAndShop1.stream().filter(e -> phoneIds.contains(e.getAppUserId())) + List<Long> collect = phoneIds.stream().map(AppUser::getId).collect(Collectors.toList()); + if (collect.isEmpty())collect.add(-1L); + technicianSubscribeByUserAndShop1 = technicianSubscribeByUserAndShop1.stream().filter(e -> collect.contains(e.getAppUserId())) .collect(Collectors.toList()); } for (TechnicianSubscribeVO technicianSubscribeVO : technicianSubscribeByUserAndShop1) { AppUser appUser = appUserClient.getAppUserById(technicianSubscribeVO.getAppUserId()); - technicianSubscribeVO.setUserName(appUser.getName()); - technicianSubscribeVO.setPhone(appUser.getPhone()); + if(appUser!=null){ + technicianSubscribeVO.setUserName(appUser.getName()); + technicianSubscribeVO.setPhone(appUser.getPhone()); + } } return pageInfo.setRecords(technicianSubscribeByUserAndShop1); } -- Gitblit v1.7.1