| | |
| | | package com.xcong.excoin; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.xcong.excoin.common.contants.AppContants; |
| | | import com.xcong.excoin.common.enumerates.CoinTypeEnum; |
| | | import com.xcong.excoin.common.enumerates.RabbitPriceTypeEnum; |
| | | import com.xcong.excoin.modules.contract.dao.ContractHoldOrderDao; |
| | | import com.xcong.excoin.modules.contract.entity.ContractHoldOrderEntity; |
| | | import com.xcong.excoin.modules.contract.service.RabbitOrderService; |
| | |
| | | import com.xcong.excoin.modules.member.dao.MemberWalletContractDao; |
| | | 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.producer.OrderProducer; |
| | | import com.xcong.excoin.utils.CalculateUtil; |
| | | import com.xcong.excoin.utils.ThreadPoolUtils; |
| | | import org.junit.jupiter.api.Test; |
| | |
| | | System.out.println(CalculateUtil.getBondAmount(openPrice, BigDecimal.valueOf(6), 1, 5)); |
| | | } |
| | | |
| | | @Autowired |
| | | private OrderProducer orderProducer; |
| | | |
| | | @Test |
| | | public void sendMsg() { |
| | | List<OrderModel> list = new ArrayList<>(); |
| | | OrderModel orderModel = new OrderModel(1L, RabbitPriceTypeEnum.ENTRUST_OPEN_MORE.getValue(), "111", "BTC"); |
| | | list.add(orderModel); |
| | | orderProducer.sendLimitClose(JSONObject.toJSONString(list)); |
| | | } |
| | | |
| | | } |