| | |
| | | this.setVersion(1); |
| | | } |
| | | |
| | | public DappAccountMoneyChangeEntity(BigDecimal amount, String content, Integer type) { |
| | | this.amount = amount; |
| | | this.content = content; |
| | | this.type = type; |
| | | |
| | | this.setCreateBy("system"); |
| | | this.setUpdateBy("system"); |
| | | this.setCreateTime(new Date()); |
| | | this.setUpdateTime(new Date()); |
| | | this.setVersion(1); |
| | | } |
| | | |
| | | private Long memberId; |
| | | |
| | | private BigDecimal preAmount; |
| | |
| | | public BigDecimal updatePTFC(Long memberId, BigDecimal totalProfit) { |
| | | BigDecimal multiply = totalProfit.multiply(new BigDecimal(0.05)); |
| | | DappAccountMoneyChangeEntity dappAccountMoneyChangeEntity = new DappAccountMoneyChangeEntity( |
| | | memberId, multiply.negate(), "系统", 9); |
| | | multiply.negate(), "系统", 9); |
| | | dappAccountMoneyChangeDao.insert(dappAccountMoneyChangeEntity); |
| | | return multiply; |
| | | } |