| | |
| | | * @author wzy |
| | | */ |
| | | public enum CoinTypeEnum { |
| | | USDT, BTC, ETH, LTC, EOS, XRP, BCH, ETC,ROC |
| | | USDT, BTC, ETH, LTC, EOS, XRP, BCH, ETC,GBZ |
| | | } |
| | |
| | | */ |
| | | @Getter |
| | | public enum SymbolEnum { |
| | | ROC("ROC", "ROC/USDT") |
| | | GBZ("GBZ", "GBZ/USDT") |
| | | ,BTC("BTC", "BTC/USDT") |
| | | ,ETH("ETH", "ETH/USDT") |
| | | ,LTC("LTC", "LTC/USDT") |
| | |
| | | } |
| | | Long memberId = memberCoinAddress.getMemberId(); |
| | | // 查询钱包 并更新 |
| | | MemberWalletCoinEntity walletCoinEntity = memberWalletCoinDao.selectWalletCoinBymIdAndCode(memberId, CoinTypeEnum.ROC.name()); |
| | | MemberWalletCoinEntity walletCoinEntity = memberWalletCoinDao.selectWalletCoinBymIdAndCode(memberId, CoinTypeEnum.GBZ.name()); |
| | | if (walletCoinEntity == null) { |
| | | // 创建一个钱包 |
| | | // 创建这个钱包 |
| | |
| | | |
| | | memberWalletCoinDao.updateBlockBalance(walletCoinEntity.getId(), balance, BigDecimal.ZERO, 0); |
| | | |
| | | String orderNo = insertCoinCharge(address, memberId, balance, CoinTypeEnum.ROC.name(), "", BigDecimal.ZERO, null); |
| | | String orderNo = insertCoinCharge(address, memberId, balance, CoinTypeEnum.GBZ.name(), "", BigDecimal.ZERO, null); |
| | | // 插入财务记录 |
| | | LogRecordUtils.insertMemberAccountMoneyChange(memberId, "转入", balance, CoinTypeEnum.ROC.name(), 1, 1); |
| | | LogRecordUtils.insertMemberAccountMoneyChange(memberId, "转入", balance, CoinTypeEnum.GBZ.name(), 1, 1); |
| | | |
| | | try { |
| | | ThreadPoolUtils.sendDingTalk(5); |
| | |
| | |
|
| | | @Override
|
| | | public Result findAllWalletCoinOrder() {
|
| | | List<OrderCoinsDealEntity> orderCoinsDealEntities = orderCoinDealDao.selectAllCoinDealsOrderBySymbol(CoinTypeEnum.ROC.toString());
|
| | | List<OrderCoinsDealEntity> orderCoinsDealEntities = orderCoinDealDao.selectAllCoinDealsOrderBySymbol(CoinTypeEnum.GBZ.toString());
|
| | | return Result.ok(orderCoinsDealEntities);
|
| | | }
|
| | |
|
| | |
| | | |
| | | public class SymbolsConstats { |
| | | public final static List<String> EXCHANGE_SYMBOLS = new ArrayList<>(); |
| | | public final static String ROC = "ROC"; |
| | | public final static String ROC = "GBZ"; |
| | | static { |
| | | EXCHANGE_SYMBOLS.add("ROC"); |
| | | EXCHANGE_SYMBOLS.add("GBZ"); |
| | | } |
| | | } |
| | |
| | | profiles: |
| | | active: prod |
| | | datasource: |
| | | url: jdbc:mysql://rm-bp1i2g5rg5dubo9s40o.mysql.rds.aliyuncs.com:3306/db_roc?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2b8 |
| | | username: roc_user |
| | | password: roc123pasd!@ |
| | | url: jdbc:mysql://127.0.0.1:3306/db_gbz?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2b8 |
| | | username: db_gbz |
| | | password: db_gbz123!@# |
| | | driver-class-name: com.mysql.jdbc.Driver |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | druid: |
| | |
| | | ## 连接超时时间(毫秒) |
| | | timeout: 30000 |
| | | rabbitmq: |
| | | host: 47.114.114.219 |
| | | host: 154.91.195.155 |
| | | port: 5672 |
| | | username: roc_user |
| | | password: roc123456 |
| | | username: abc_user |
| | | password: abc123 |
| | | publisher-confirm-type: correlated |
| | | |
| | | |
| | |
| | | debug: false |
| | | redis_expire: 3000 |
| | | kline-update-job: false |
| | | newest-price-update-job: false |
| | | exchange-trade: false |
| | | newest-price-update-job: true |
| | | exchange-trade: true |
| | | day-line: false |
| | | other-job: false |
| | | other-job: true |
| | | loop-job: false |
| | | rabbit-consumer: false |
| | | block-job: false |
| | | block-job: true |
| | | |
| | | aliyun: |
| | | oss: |