| | |
| | | // 2.0 |
| | | ArrayList<Map<String,Object>> objects = new ArrayList<>(); |
| | | if(null != competition.getStoreId()){ |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | |
| | | String storeId = competition.getStoreId(); |
| | | for (String s : storeId.split(",")) { |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | Store store = storeClient.queryStoreById(Integer.valueOf(s)); |
| | | map.put("name",store.getName()); |
| | | map.put("address",store.getAddress()); |
| | |
| | | double wgs84 = new BigDecimal(distance.get("WGS84")).divide(new BigDecimal(1000)).setScale(2, RoundingMode.HALF_EVEN).doubleValue(); |
| | | map.put("distance",wgs84); |
| | | } |
| | | } |
| | | objects.add(map); |
| | | } |
| | | |
| | | } |
| | | competitionInfo.setStoreInfos(objects); |
| | | |
| | | |