| | |
| | | import com.xcong.excoin.modules.coin.dao.OrderCoinsDao; |
| | | import com.xcong.excoin.modules.coin.entity.OrderCoinsEntity; |
| | | import com.xcong.excoin.modules.coin.service.OrderCoinService; |
| | | import com.xcong.excoin.modules.symbols.constants.SymbolsConstats; |
| | | import com.xcong.excoin.modules.symbols.service.SymbolsService; |
| | | import com.xcong.excoin.processor.CoinProcessor; |
| | | import com.xcong.excoin.processor.CoinProcessorFactory; |
| | |
| | | **/ |
| | | @Slf4j |
| | | @Component |
| | | //@ConditionalOnProperty(prefix = "app", name = "trade", havingValue = "true") |
| | | @ConditionalOnProperty(prefix = "app", name = "trade", havingValue = "true") |
| | | public class CoinTradeInitJob { |
| | | |
| | | @Resource |
| | |
| | | @PostConstruct |
| | | public void initCoinTrade() { |
| | | log.info("#=======撮合交易器开启=======#"); |
| | | String symbol = "NEKK"; |
| | | String symbol = SymbolsConstats.CPV; |
| | | CoinTrader newTrader = new CoinTrader(symbol); |
| | | newTrader.setExchangeProducer(exchangeProducer); |
| | | //newTrader.setKafkaTemplate(kafkaTemplate); |
| | |
| | | processor.initializeThumb(); |
| | | //processor.initializeUsdRate(); |
| | | processor.setIsHalt(false); |
| | | List<ExchangeTrade> nekk = orderCoinDealDao.selectOrderCoinDealByTime("NEKK", null, null); |
| | | List<ExchangeTrade> nekk = orderCoinDealDao.selectOrderCoinDealByTime(SymbolsConstats.CPV, null, null); |
| | | processor.process(nekk); |
| | | String symbolUsdt = symbol; |
| | | if(!symbol.contains("USDT")){ |