| | |
| | | map.put("low", low.setScale(decimal, RoundingMode.HALF_UP)); |
| | | map.put("volume", kline.getVolume()); |
| | | |
| | | if (line.equalsIgnoreCase(Kline.PERIOD_15MIN) || line.equalsIgnoreCase(Kline.PERIOD_30MIN) || line.equalsIgnoreCase(Kline.PERIOD_60MIN)) { |
| | | //if (line.equalsIgnoreCase(Kline.PERIOD_15MIN) || line.equalsIgnoreCase(Kline.PERIOD_30MIN) || line.equalsIgnoreCase(Kline.PERIOD_60MIN)) { |
| | | if (i == data.size() - 1) { |
| | | BeforeClose beforeClose = dataDBService.getBeforeClose(kline.getSymbol(), line, ts); |
| | | if (beforeClose != null) { |
| | |
| | | map.put("low", beforeClose.getMinClose().setScale(decimal, RoundingMode.HALF_UP)); |
| | | } |
| | | } |
| | | } |
| | | //} |
| | | list.add(map); |
| | | } |
| | | return list; |
| | |
| | | } |
| | | beforeClose.setMaxClose(convertToBigDecimal(resultMap.get("maxClose"))); |
| | | beforeClose.setMinClose(convertToBigDecimal(resultMap.get("minClose"))); |
| | | redisTemplate.opsForValue().set(RedisKeys.REAL_TIME_BEFORE_CLOSE + symbol + line, beforeClose , 5 , TimeUnit.MINUTES); |
| | | redisTemplate.opsForValue().set(RedisKeys.REAL_TIME_BEFORE_CLOSE + symbol + line, beforeClose , 1 , TimeUnit.MINUTES); |
| | | } |
| | | return beforeClose; |
| | | } |