| | |
| | | @Autowired |
| | | private NamedParameterJdbcOperations namedParameterJdbcTemplate; |
| | | |
| | | /* public static void main(String[] args) { |
| | | BigDecimal a = BigDecimal.valueOf(0.006); |
| | | BigDecimal b = BigDecimal.valueOf(3600); |
| | | BigDecimal c = a.divide(b, 6, BigDecimal.ROUND_HALF_UP); |
| | | /*public static void main(String[] args) { |
| | | BigDecimal a = BigDecimal.valueOf(0.003); |
| | | BigDecimal b = BigDecimal.valueOf(7200); |
| | | BigDecimal c = a.divide(b, 10, BigDecimal.ROUND_HALF_UP); |
| | | System.out.println(c); |
| | | }*/ |
| | | @Override |
| | |
| | | kline.setHigh(kline.getHigh().add(currentValue)); |
| | | kline.setAdjusted(true); |
| | | |
| | | BigDecimal last = AdjustmentValueCache.getLastValue().get(symbol); |
| | | /*BigDecimal last = AdjustmentValueCache.getLastValue().get(symbol); |
| | | if (last != null && last.compareTo(BigDecimal.ZERO) > 0) { |
| | | BigDecimal adj = currentValue.subtract(last); |
| | | if (adj.compareTo(BigDecimal.ZERO) > 0) { //递增 |
| | |
| | | } |
| | | } else { |
| | | AdjustmentValueCache.getLastValue().put(symbol, currentValue); |
| | | } |
| | | }*/ |
| | | } |
| | | } |
| | | klineDBService.save(kline); |