| | |
| | | //这个时间段的新增余额 |
| | | //此刻的余额-上一次账户的余额 = 这个时间段的新增余额 |
| | | BigDecimal subtract = coinCnt.subtract(coinAmountOld); |
| | | if(BigDecimal.ZERO.compareTo(subtract) >= 0){ |
| | | return; |
| | | } |
| | | //获取这个时刻的滑点入账数量 |
| | | BigDecimal multiply = coinPrice.multiply(subtract).multiply(new BigDecimal("0.97")).setScale(8,BigDecimal.ROUND_DOWN); |
| | | //更新这个时间段的滑点数量 |
| | |
| | | dappHdRecordAdd.setCoinEvery(subtract); |
| | | dappHdRecordAdd.setCoinAmount(coinCnt); |
| | | dappHdRecordMapper.insert(dappHdRecordAdd); |
| | | |
| | | if(BigDecimal.ZERO.compareTo(subtract) >= 0){ |
| | | return; |
| | | } |
| | | dappSystemService.tradeProfitDistribute(1L); |
| | | } |
| | | |