| | |
| | | package com.yami.trading.huobi.data.internal; |
| | | |
| | | |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.yami.trading.bean.data.domain.Realtime; |
| | | import com.yami.trading.common.config.RequestDataHelper; |
| | |
| | | |
| | | // 最近60s内实时价格集合 |
| | | List<Realtime> list = DataCache.latestRealTimeMap_60s.get(symbol); |
| | | if (list.size() >= KlineConstant.LATEST_REALTIME_LIST_MAX) { |
| | | list.remove(0); |
| | | if(CollectionUtil.isNotEmpty(list)){ |
| | | if (list.size() >= KlineConstant.LATEST_REALTIME_LIST_MAX) { |
| | | list.remove(0); |
| | | } |
| | | list.add(realtime); |
| | | DataCache.latestRealTimeMap_60s.put(symbol, list); |
| | | } |
| | | list.add(realtime); |
| | | DataCache.latestRealTimeMap_60s.put(symbol, list); |
| | | RealtimeQueue.add(realtime); |
| | | } |
| | | |