| | |
| | | PageInfo<XpOperationsUserWithRoleVO> ret = operationUserClient.listByQueryIds(query).getData(); |
| | | |
| | | // 设置距离,然后排序 |
| | | ret.getRecords().forEach(e -> e.setDis(String.valueOf(disMap.get(e.getId())))); |
| | | |
| | | if (ret == null || ret.getRecords() == null || ret.getRecords().isEmpty()) { |
| | | return R.ok(); |
| | | } |
| | | ret.getRecords().forEach(e -> e.setDis(disMap.get(e.getId()))); |
| | | List<XpOperationsUserWithRoleVO> sorted = ret.getRecords().stream().sorted(Comparator.comparing(XpOperationsUserWithRoleVO::getDis)).collect(Collectors.toList()); |
| | | ret.setRecords(sorted); |
| | | return R.ok(ret); |