| | |
| | | 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)); |
| | | } |
| | |
| | | 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: |
| | |
| | | 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; |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Slf4j |
| | | @SpringBootTest |
| | |
| | | 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()); |
| | | } |
| | | |
| | | } |