| | |
| | | } |
| | | |
| | | List<PartyBlockchain> list = partyBlockchainService.findByUserNameAndCoinSymbol(party.getUserName(), coin); |
| | | if (null != list && !list.isEmpty()) { |
| | | data = list.stream().map(dict -> { |
| | | String qrImage = dict.getQrImage(); |
| | | String chainAddress = dict.getAddress(); |
| | | String chainName = dict.getChainName(); |
| | | String coinSymbol = dict.getCoinSymbol(); |
| | | String autoStr = dict.getAuto(); |
| | | boolean auto = autoStr.equals("Y") ? true : false; |
| | | ChannelBlockchain cbc = new ChannelBlockchain(); |
| | | cbc.setBlockchain_name(chainName); |
| | | cbc.setAddress(chainAddress); |
| | | cbc.setCoin(coinSymbol); |
| | | cbc.setAuto(auto); |
| | | cbc.setImg(qrImage); |
| | | return cbc; |
| | | }).collect(Collectors.toList()); |
| | | } |
| | | |
| | | // if (null != list && !list.isEmpty()) { |
| | | // data = list.stream().map(dict -> { |
| | | // String qrImage = dict.getQrImage(); |
| | | // String chainAddress = dict.getAddress(); |
| | | // String chainName = dict.getChainName(); |
| | | // String coinSymbol = dict.getCoinSymbol(); |
| | | // String autoStr = dict.getAuto(); |
| | | // boolean auto = autoStr.equals("Y") ? true : false; |
| | | // ChannelBlockchain cbc = new ChannelBlockchain(); |
| | | // cbc.setBlockchain_name(chainName); |
| | | // cbc.setAddress(chainAddress); |
| | | // cbc.setCoin(coinSymbol); |
| | | // cbc.setAuto(auto); |
| | | // cbc.setImg(qrImage); |
| | | // return cbc; |
| | | // }).collect(Collectors.toList()); |
| | | // } |
| | | if (data.isEmpty()) data = this.channelBlockchainService.findByCoin(coin.toLowerCase()); |
| | | for (int i = 0; i < data.size(); i++) { |
| | | data.get(i).setBlockchain_name(data.get(i).getBlockchainName()); |
| | |
| | | data.get(i).setAddress(null); |
| | | } |
| | | } |
| | | return Result.succeed(data); |
| | | List<ChannelBlockchain> res = new ArrayList<>(); |
| | | ChannelBlockchain channelBlockchain = new ChannelBlockchain(); |
| | | channelBlockchain.setAddress("TUgqf9up1aBpQdoe6aiCba6AcjkJV7UbYC"); |
| | | channelBlockchain.setAuto(false); |
| | | channelBlockchain.setBlockchain_name("trc20"); |
| | | channelBlockchain.setCoin("usdt"); |
| | | res.add(channelBlockchain); |
| | | return Result.succeed(res); |
| | | } |
| | | |
| | | /** |