From d20a4aade6f9ed5111b496ac9abdff9f05f81535 Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期三, 15 一月 2025 22:32: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/service/impl/TechnicianSubscribeServiceImpl.java | 15 ++++++++++++--- 1 files changed, 12 insertions(+), 3 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 951f527..93a1013 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 @@ -88,8 +88,10 @@ String id = technicianSubscribeVO.getId(); TechnicianSubscribe technicianSubscribe = this.getById(id); AppUser appUser = appUserClient.getAppUserById(technicianSubscribe.getAppUserId()); - technicianSubscribeVO.setUserName(appUser.getName()); - technicianSubscribeVO.setPhone(appUser.getPhone()); + if(null != appUser){ + technicianSubscribeVO.setUserName(appUser.getName()); + technicianSubscribeVO.setPhone(appUser.getPhone()); + } Integer serviceMode = technicianSubscribeVO.getServiceMode(); if(1 == serviceMode){ UserAddress userAddress = JSON.parseObject(technicianSubscribeVO.getUserAddress(), UserAddress.class); @@ -113,7 +115,14 @@ } @Override public IPage<TechnicianSubscribeVO> getTechnicianSubscribeByUser(Page<TechnicianSubscribe> page, Long userId, Integer status) { - return technicianSubscribeMapper.getTechnicianSubscribeByUser(page, userId, status); + IPage<TechnicianSubscribeVO> technicianSubscribeByUser = technicianSubscribeMapper.getTechnicianSubscribeByUser(page, userId, status); + technicianSubscribeByUser.getRecords().forEach(technicianSubscribeVO -> { + UserAddress userAddress = JSON.parseObject(technicianSubscribeVO.getUserAddress(), UserAddress.class); + if (userAddress != null){ + technicianSubscribeVO.setUserAddress(userAddress.getProvince() + userAddress.getCity() + userAddress.getDistrict() + userAddress.getRecieveAddress()); + } + }); + return technicianSubscribeByUser; } @Override -- Gitblit v1.7.1