src/main/java/com/xcong/excoin/modules/contract/service/impl/ContractHoldOrderServiceImpl.java
@@ -633,10 +633,10 @@ OrderModel model = null; // 开多 if (ContractHoldOrderEntity.OPENING_TYPE_MORE == type) { model = new OrderModel(id, RabbitPriceTypeEnum.CLOSE_MORE_BOMB.getValue(), forceClosingPrice.setScale(8, RoundingMode.HALF_UP).toPlainString(), symbol); model = new OrderModel(id, RabbitPriceTypeEnum.CLOSE_MORE_BOMB.getValue(), forceClosingPrice.setScale(8, RoundingMode.HALF_UP).toPlainString(), symbol, 1); // 开空 } else { model = new OrderModel(id, RabbitPriceTypeEnum.CLOSE_LESS_BOMB.getValue(), forceClosingPrice.setScale(8, RoundingMode.HALF_UP).toPlainString(), symbol); model = new OrderModel(id, RabbitPriceTypeEnum.CLOSE_LESS_BOMB.getValue(), forceClosingPrice.setScale(8, RoundingMode.HALF_UP).toPlainString(), symbol, 1); } producer.sendPriceOperate(JSONObject.toJSONString(model)); } src/main/resources/application.yml
@@ -7,9 +7,9 @@ profiles: active: dev datasource: url: jdbc:mysql://120.27.238.55:3306/kss_framework?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2b8 username: ct_test password: 123456 url: jdbc:mysql://rm-bp151tw8er79ig9kb5o.mysql.rds.aliyuncs.com:3306/db_biue?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2b8 username: ctcoin_data password: ctcoin_123 driver-class-name: com.mysql.jdbc.Driver type: com.alibaba.druid.pool.DruidDataSource druid: src/test/java/com/xcong/excoin/KssframeworkApplicationTests.java
@@ -4,6 +4,8 @@ import com.xcong.excoin.common.enumerates.SymbolEnum; import com.xcong.excoin.configurations.properties.AliOssProperties; import com.xcong.excoin.modules.coin.service.BlockCoinService; import com.xcong.excoin.modules.contract.entity.ContractHoldOrderEntity; import com.xcong.excoin.modules.contract.service.ContractHoldOrderService; import com.xcong.excoin.modules.test.dao.TestUserDao; import com.xcong.excoin.modules.test.entity.TestUserEntity; import com.xcong.excoin.modules.test.service.TestUserService; @@ -13,6 +15,7 @@ import javax.annotation.Resource; import java.util.Date; import java.util.List; @Slf4j @SpringBootTest @@ -23,7 +26,7 @@ @Test public void testUserInsert() { for(int i = 0; i < 20; i++) { for (int i = 0; i < 20; i++) { TestUserEntity testUser = new TestUserEntity(); testUser.setCreateBy("123"); testUser.setCreateTime(new Date()); @@ -74,4 +77,14 @@ blockCoinService.updateEthUsdt(); } @Resource ContractHoldOrderService contractHoldOrderService; @Test public void coinOutTest() { List<ContractHoldOrderEntity> list = contractHoldOrderService.selectContractHoldOrderByBatchNo("7948d5f5-222d-44db-bd60-69dbe762dc38"); log.info("--->{}", list); log.info("------>{}", list.get(0).getId()); } }