修改找不到片区信息的BUG

This commit is contained in:
wans 2021-10-12 16:00:22 +08:00
parent a137a73d68
commit cf8cb15921

View File

@ -708,17 +708,25 @@ public class UserLocationServiceImpl extends BaseService implements IUserLocatio
@Override @Override
public List<GridDTO> listElectronicFenceOfMineByGridService(String token, Map<String, Object> params) { public List<GridDTO> listElectronicFenceOfMineByGridService(String token, Map<String, Object> params) {
String userId = AppTokenManager.getInstance().getToken(token).getAppTokenUser().getId(); String userId = AppTokenManager.getInstance().getToken(token).getAppTokenUser().getId();
//userId = "f569baa1-8c99-47bb-98d8-5eea132e0051";
/** /**
* 小王帅 2021年7月4日16:31:24 * 小王帅 2021年7月4日16:31:24
* 因为片区信息中relation_id保存的是community_boss_id * 因为片区信息中relation_id保存的是community_boss_id
* 所以要用userId去查询 * 所以要用userId去查询
* 2021-10-12 一个用户可能有多个片区信息
*/ */
Map<String, Object> queryMap = new HashMap<>(4); Map<String, Object> queryMap = new HashMap<>(4);
queryMap.put("communityBossUserId",userId); //queryMap.put("communityBossUserId",userId);
CommunityBossDTO communityBoss = communityBossService.getCommunityBoss(queryMap); List<String> communityBossUserIds = new ArrayList<>();
communityBossUserIds.add(userId);
queryMap.put("communityBossUserIds", communityBossUserIds);
List<CommunityBossDTO> communityBossDTOS = communityBossService.listCommunityBoss(queryMap);
//CommunityBossDTO communityBoss = communityBossService.getCommunityBoss(queryMap);
List<String> userIdList = new ArrayList<>(); List<String> userIdList = new ArrayList<>();
if(communityBoss != null){ if(communityBossDTOS != null){
userIdList.add(communityBoss.getCommunityBossId()); for (CommunityBossDTO item : communityBossDTOS) {
userIdList.add(item.getCommunityBossId());
}
} }
userIdList.add(userId); userIdList.add(userId);
return userPointsService.listUserPointsByGridService(userIdList); return userPointsService.listUserPointsByGridService(userIdList);