From cf8cb15921fb34b794ecad022e3cb534c47605c1 Mon Sep 17 00:00:00 2001 From: wans <747101512@qq.com> Date: Tue, 12 Oct 2021 16:00:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=89=BE=E4=B8=8D=E5=88=B0?= =?UTF-8?q?=E7=89=87=E5=8C=BA=E4=BF=A1=E6=81=AF=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/UserLocationServiceImpl.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/cm/systemcity/service/userlocation/impl/UserLocationServiceImpl.java b/src/main/java/com/cm/systemcity/service/userlocation/impl/UserLocationServiceImpl.java index c9d451d..a459c26 100755 --- a/src/main/java/com/cm/systemcity/service/userlocation/impl/UserLocationServiceImpl.java +++ b/src/main/java/com/cm/systemcity/service/userlocation/impl/UserLocationServiceImpl.java @@ -708,17 +708,25 @@ public class UserLocationServiceImpl extends BaseService implements IUserLocatio @Override public List listElectronicFenceOfMineByGridService(String token, Map params) { String userId = AppTokenManager.getInstance().getToken(token).getAppTokenUser().getId(); + //userId = "f569baa1-8c99-47bb-98d8-5eea132e0051"; /** * 小王帅 2021年7月4日16:31:24 * 因为片区信息中relation_id保存的是community_boss_id * 所以要用userId去查询 + * 2021-10-12 一个用户可能有多个片区信息 */ Map queryMap = new HashMap<>(4); - queryMap.put("communityBossUserId",userId); - CommunityBossDTO communityBoss = communityBossService.getCommunityBoss(queryMap); + //queryMap.put("communityBossUserId",userId); + List communityBossUserIds = new ArrayList<>(); + communityBossUserIds.add(userId); + queryMap.put("communityBossUserIds", communityBossUserIds); + List communityBossDTOS = communityBossService.listCommunityBoss(queryMap); + //CommunityBossDTO communityBoss = communityBossService.getCommunityBoss(queryMap); List userIdList = new ArrayList<>(); - if(communityBoss != null){ - userIdList.add(communityBoss.getCommunityBossId()); + if(communityBossDTOS != null){ + for (CommunityBossDTO item : communityBossDTOS) { + userIdList.add(item.getCommunityBossId()); + } } userIdList.add(userId); return userPointsService.listUserPointsByGridService(userIdList);