| | |
| | | import com.xcong.excoin.modules.coin.service.OrderCoinService; |
| | | import com.xcong.excoin.trade.CoinTrader; |
| | | import com.xcong.excoin.trade.CoinTraderFactory; |
| | | import com.xcong.excoin.trade.ExchangeTrade; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.springframework.amqp.rabbit.annotation.RabbitListener; |
| | | import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Iterator; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 提交买卖单进入撮合系统 |
| | |
| | | |
| | | @RabbitListener(queues = RabbitMqConfig.QUEUE_ROC_ORDER_SUBMIT) |
| | | public void doSomething(String content) { |
| | | log.info("#提交的订单---->{}#", content); |
| | | //log.info("#提交的订单---->{}#", content); |
| | | OrderCoinsEntity coinsEntity = JSONObject.parseObject(content, OrderCoinsEntity.class); |
| | | String symbol = coinsEntity.getSymbol(); |
| | | CoinTrader trader = factory.getTrader(symbol); |
| | |
| | | */ |
| | | @RabbitListener(queues = RabbitMqConfig.QUEUE_ROC_ORDER_CANCEL) |
| | | public void doCancel(String content) { |
| | | log.info("#取消的订单---->{}#", content); |
| | | //log.debug("#取消的订单---->{}#", content); |
| | | orderCoinService.cancelEntrustWalletCoinOrderForMatch(content); |
| | | } |
| | | |
| | | |
| | | } |