| | |
| | | import com.xcong.excoin.modules.member.entity.MemberEntity; |
| | | import com.xcong.excoin.modules.member.entity.MemberWalletContractEntity; |
| | | import com.xcong.excoin.rabbit.pricequeue.OrderModel; |
| | | import com.xcong.excoin.rabbit.pricequeue.WebsocketPriceService; |
| | | import com.xcong.excoin.rabbit.producer.OrderProducer; |
| | | import com.xcong.excoin.utils.CalculateUtil; |
| | | import com.xcong.excoin.utils.CoinTypeConvert; |
| | | import com.xcong.excoin.utils.RedisUtils; |
| | | import com.xcong.excoin.utils.ThreadPoolUtils; |
| | | import org.junit.jupiter.api.Test; |
| | |
| | | } |
| | | } |
| | | |
| | | @Resource |
| | | WebsocketPriceService websocketPriceService; |
| | | |
| | | @Test |
| | | public void priceTest() { |
| | | String symbol = "BTC/USDT"; |
| | | String price = "13095.00"; |
| | | // TODO 测试环境关闭这个插入redis |
| | | redisUtils.set(CoinTypeConvert.convertToKey(symbol), price); |
| | | // 比较 |
| | | websocketPriceService.comparePriceAsc(symbol, price); |
| | | websocketPriceService.comparePriceDesc(symbol, price); |
| | | } |
| | | } |