| | |
| | | public boolean systemHasStart() { |
| | | String hasStart = redisUtils.getString(AppContants.SYSTEM_START_FLAG); |
| | | if (!"start".equals(hasStart)) { |
| | | log.info("系统未启动"); |
| | | return false; |
| | | } |
| | | |
| | |
| | | */ |
| | | @Override |
| | | public void sdmWithdrawFee(String data) { |
| | | BigDecimal totalFee = new BigDecimal(data); |
| | | JSONObject jsonObject = JSONObject.parseObject(data); |
| | | |
| | | String address = jsonObject.getString("address"); |
| | | if (!ChainEnum.BSC_TFC_FEE.getAddress().equals(address)) { |
| | | return; |
| | | } |
| | | |
| | | BigDecimal totalFee = new BigDecimal(jsonObject.getString("fee")); |
| | | String batchNo = RandomUtil.randomString(16); |
| | | |
| | | BigDecimal cardProfit = totalFee.multiply(new BigDecimal("0.5")); |
| | | BigDecimal cardProfit = totalFee.multiply(new BigDecimal("0.4")); |
| | | BigDecimal destroy = totalFee.subtract(cardProfit); |
| | | |
| | | BigDecimal preFee = cardProfit.divide(BigDecimal.valueOf(5000), ChainService.getInstance(ChainEnum.BSC_TFC.name()).decimals(), RoundingMode.HALF_UP); |
| | |
| | | if (member == null) { |
| | | continue; |
| | | } |
| | | DappFundFlowEntity fundFlow = new DappFundFlowEntity(member.getId(), amount, 4, 1, null, null); |
| | | DappFundFlowEntity fundFlow = new DappFundFlowEntity(member.getId(), amount, 4, 2, null, null); |
| | | dappFundFlowDao.insert(fundFlow); |
| | | |
| | | OnlineTransferUtil.addTransfer(entry.getKey(), amount, 5, 1, ChainEnum.BSC_TFC_FEE.name(), AppContants.SYMBOL_COIN, batchNo); |