| | |
| | | if ("upgrade".equals(upgrade)) { |
| | | throw new FebsException("功能升级中"); |
| | | } |
| | | BigDecimal amountIn = transferAusdDto.getAmount(); |
| | | if(BigDecimal.ZERO.compareTo(amountIn) >= 0){ |
| | | throw new FebsException("请输入正确的金额"); |
| | | } |
| | | |
| | | /** |
| | | * 充值 |
| | |
| | | memberCoinWithdrawEntity.setStatus(MemberCoinWithdrawEntity.STATUS_YES); |
| | | memberCoinWithdrawEntity.setIsInside(MemberCoinWithdrawEntity.ISINSIDE_NO); |
| | | memberCoinWithdrawDao.updateById(memberCoinWithdrawEntity); |
| | | |
| | | /** |
| | | * 提现手续费10%进入资产管理池 |
| | | * USDT_ORDER_PERCENT |
| | | */ |
| | | BigDecimal withdrawFee = dappFundFlowEntity.getFee(); |
| | | if(BigDecimal.ZERO.compareTo(withdrawFee) < 0){ |
| | | BigDecimal addPoor = withdrawFee; |
| | | |
| | | DataDictionaryCustom packageScorePriceDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( |
| | | DataDictionaryEnum.PACKAGE_SCORE_PRICE.getType(), |
| | | DataDictionaryEnum.PACKAGE_SCORE_PRICE.getCode() |
| | | ); |
| | | DataDictionaryCustom packageTotalScoreDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( |
| | | DataDictionaryEnum.PACKAGE_TOTAL_SCORE.getType(), |
| | | DataDictionaryEnum.PACKAGE_TOTAL_SCORE.getCode() |
| | | ); |
| | | BigDecimal packageTotalScore = new BigDecimal(ObjectUtil.isEmpty(packageTotalScoreDic) ? "21000" : packageTotalScoreDic.getValue()).setScale(2, BigDecimal.ROUND_DOWN); |
| | | //更新USDT底池 |
| | | DataDictionaryCustom packagePoorDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( |
| | | DataDictionaryEnum.PACKAGE_POOR.getType(), |
| | | DataDictionaryEnum.PACKAGE_POOR.getCode() |
| | | ); |
| | | BigDecimal packagePoor = new BigDecimal(ObjectUtil.isEmpty(packagePoorDic) ? "0" : packagePoorDic.getValue()).setScale(2, BigDecimal.ROUND_DOWN); |
| | | BigDecimal avaPackagePoor = packagePoor.add(addPoor); |
| | | packagePoorDic.setValue(avaPackagePoor.toString()); |
| | | dataDictionaryCustomMapper.updateById(packagePoorDic); |
| | | //计算当前价格 |
| | | BigDecimal divide = avaPackagePoor.divide(packageTotalScore, 8, BigDecimal.ROUND_DOWN); |
| | | packageScorePriceDic.setValue(divide.toString()); |
| | | dataDictionaryCustomMapper.updateById(packageScorePriceDic); |
| | | } |
| | | return new FebsResponse().success(); |
| | | } |
| | | |
| | |
| | | IPage<DappAccountMoneyChangeEntity> memberMoneyFlowVos = dappAccountMoneyChangeDao.getChangeInPageInPage(page,changeInPageDto); |
| | | return new FebsResponse().success().data(memberMoneyFlowVos); |
| | | } |
| | | |
| | | @Override |
| | | public FebsResponse changeInToday() { |
| | | DappMemberEntity member = LoginUserUtil.getAppUser(); |
| | | Long memberId = member.getId(); |
| | | DappAccountMoneyChangeEntity dappAccountMoneyChangeEntity = dappAccountMoneyChangeDao.selectNewOneByMemberId(memberId); |
| | | return new FebsResponse().success().data(dappAccountMoneyChangeEntity); |
| | | } |
| | | } |