| | |
| | | import com.yami.trading.common.web.ResultObject; |
| | | import com.yami.trading.huobi.data.AdjustmentValueCache; |
| | | import com.yami.trading.huobi.data.DataCache; |
| | | import com.yami.trading.huobi.data.internal.DataDBService; |
| | | import com.yami.trading.service.item.ItemService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | public class RealtimePushJob implements Runnable { |
| | | @Autowired |
| | | private ItemService itemService; |
| | | @Autowired |
| | | DataDBService dataDBService; |
| | | |
| | | public void start() { |
| | | new Thread(this, "realtimePushJob").start(); |
| | |
| | | map.put("timestamp", realtime.getTs()); |
| | | map.put("current_time", realtime.getCurrentTime()); |
| | | map.put("name", realtime.getName()); |
| | | map.put("change_ratio", realtime.getChangeRatio()); |
| | | map.put("change_ratio", dataDBService.getChangeRatio(realtime, symbol)); |
| | | map.put("netChange", realtime.getNetChange()); |
| | | map.put("open", realtime.getOpen()); |
| | | map.put("close", realtime.getClose()); |