From 3d88bf929fc637a898ea0ca3e64cd6c1ec26a182 Mon Sep 17 00:00:00 2001
From: 罗元桥 <2376770955@qq.com>
Date: 星期六, 31 七月 2021 21:09:44 +0800
Subject: [PATCH] Merge branch 'master' into 'test'

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComSwRotaServiceImpl.java |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComSwRotaServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComSwRotaServiceImpl.java
index 6875d1a..76fc005 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComSwRotaServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComSwRotaServiceImpl.java
@@ -216,10 +216,13 @@
             String[] rotaPersonArray = rotaPerson.split(",");
             for (int i = 0; i <= rotaPersonArray.length - 1; i++){
                 ComSwRotaPersonVO comSwRotaPersonVO = new ComSwRotaPersonVO();
-                Map<String,String> person = comSwPatrolRecordDAO.getPbServiceTeamById(rotaPersonArray[i]);
                 comSwRotaPersonVO.setId(Long.valueOf(rotaPersonArray[i]));
-                comSwRotaPersonVO.setName(person.get("name"));
-                comSwRotaPersonVO.setPhone(Long.valueOf(person.get("phone")));
+                Map<String,String> userMap = this.comSwRotaDAO.getImageUrl(Long.valueOf(rotaPersonArray[i]));
+                if(userMap != null){
+                    comSwRotaPersonVO.setPhone(userMap.get("phone"));
+                    comSwRotaPersonVO.setImageUrl(userMap.get("url"));
+                    comSwRotaPersonVO.setName(userMap.get("name"));
+                }
                 rotaPersons.add(comSwRotaPersonVO);
             }
         }
@@ -240,10 +243,13 @@
             String[] rotaPersonArray = rotaPerson.split(",");
             for (int i = 0; i <= rotaPersonArray.length - 1; i++){
                 ComSwRotaPersonVO comSwRotaPersonVO = new ComSwRotaPersonVO();
-                Map<String,String> leader = comSwPatrolRecordDAO.getPbServiceTeamById(rotaPersonArray[i]);
                 comSwRotaPersonVO.setId(Long.valueOf(rotaPersonArray[i]));
-                comSwRotaPersonVO.setName(leader.get("name"));
-                comSwRotaPersonVO.setPhone(Long.valueOf(leader.get("phone")));
+                Map<String,String> userMap = this.comSwRotaDAO.getImageUrl(Long.valueOf(rotaPersonArray[i]));
+                if(userMap != null){
+                    comSwRotaPersonVO.setPhone(userMap.get("phone"));
+                    comSwRotaPersonVO.setImageUrl(userMap.get("url"));
+                    comSwRotaPersonVO.setName(userMap.get("name"));
+                }
                 rotaLeaders.add(comSwRotaPersonVO);
             }
         }

--
Gitblit v1.7.1