| | |
| | | BigDecimal planAmount = igtOnHookPlanOrder.getPlanAmount(); |
| | | |
| | | DappMemberEntity dappMemberEntity = dappMemberDao.selectById(memberId); |
| | | //是否设置了亏损 |
| | | Integer isProfit = dappMemberEntity.getIsProfit() == null ? 1 : dappMemberEntity.getIsProfit(); |
| | | if(2 == isProfit){ |
| | | BigDecimal bigDecimal = planAmount.divide(new BigDecimal(2)).setScale(4, BigDecimal.ROUND_DOWN); |
| | | DappWalletCoinEntity dappWalletCoinEntity = dappWalletCoinDao.selectByMemberId(memberId); |
| | | BigDecimal availableAmount = dappWalletCoinEntity.getAvailableAmount(); |
| | | dappWalletCoinDao.addTotalAndaddAvailableById(dappWalletCoinEntity.getId(),bigDecimal); |
| | | BigDecimal add = availableAmount.add(bigDecimal).setScale(4, BigDecimal.ROUND_DOWN); |
| | | DappAccountMoneyChangeEntity dappAccountMoneyChangeEntity = new DappAccountMoneyChangeEntity(memberId, availableAmount, bigDecimal, add, "系统", 9); |
| | | dappAccountMoneyChangeDao.insert(dappAccountMoneyChangeEntity); |
| | | }else{ |
| | | //获取收益率 |
| | | DataDictionaryCustom identityDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(DataDictionaryEnum.LEVEL_MB.getType(), dappMemberEntity.getIdentity()); |
| | | String identityDicValue = identityDic.getValue(); |
| | |
| | | dappAccountMoneyChangeDao.insert(dappAccountMoneyChangeEntity); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | |