| | |
| | | if(ObjectUtil.isEmpty(dappMemberEntity)) { |
| | | return new FebsResponse().fail().message("会员信息不存在"); |
| | | } |
| | | dappMemberEntity.setActiveStatus(1); |
| | | dappMemberEntity.setActiveStatus(2); |
| | | dappMemberDao.updateById(dappMemberEntity); |
| | | return new FebsResponse().success(); |
| | | } |
| | |
| | | return new FebsResponse().success(); |
| | | } |
| | | |
| | | @Override |
| | | public FebsResponse updateSystemPay(MallSystemPayDto mallSystemPayDto) { |
| | | Long memberId = mallSystemPayDto.getId(); |
| | | DappMemberEntity mallMember = dappMemberDao.selectById(memberId); |
| | | if(ObjectUtil.isEmpty(mallMember)){ |
| | | return new FebsResponse().fail().message("系统繁忙,请刷新页面重试"); |
| | | } |
| | | |
| | | BigDecimal bigDecimal = mallSystemPayDto.getAddBalance(); |
| | | |
| | | Integer type = mallSystemPayDto.getType(); |
| | | if (type == 1) { |
| | | dappWalletCoinDao.addTotalAndaddAvailableById(memberId,bigDecimal); |
| | | //插入流水 |
| | | DappFundFlowEntity amountFlow = new DappFundFlowEntity( |
| | | memberId, |
| | | bigDecimal, |
| | | FundFlowEnum.SYSTEM_AMOUNT.getCode(), |
| | | DappFundFlowEntity.WITHDRAW_STATUS_AGREE, |
| | | BigDecimal.ZERO); |
| | | dappFundFlowDao.insert(amountFlow); |
| | | } else if (type == 2) { |
| | | dappWalletMineDao.addTotalAndaddAvailableById(bigDecimal,memberId); |
| | | //插入流水 |
| | | DappFundFlowEntity amountFlow = new DappFundFlowEntity( |
| | | memberId, |
| | | bigDecimal, |
| | | FundFlowEnum.SYSTEM_SCORE.getCode(), |
| | | DappFundFlowEntity.WITHDRAW_STATUS_AGREE, |
| | | BigDecimal.ZERO); |
| | | dappFundFlowDao.insert(amountFlow); |
| | | } else if (type == 3) { |
| | | BigDecimal balance = mallMember.getBalance(); |
| | | balance = balance.add(bigDecimal); |
| | | mallMember.setBalance(balance); |
| | | dappMemberDao.updateById(mallMember); |
| | | //插入流水 |
| | | DappFundFlowEntity amountFlow = new DappFundFlowEntity( |
| | | memberId, |
| | | bigDecimal, |
| | | FundFlowEnum.SYSTEM_PACKAGE.getCode(), |
| | | DappFundFlowEntity.WITHDRAW_STATUS_AGREE, |
| | | BigDecimal.ZERO); |
| | | dappFundFlowDao.insert(amountFlow); |
| | | } else { |
| | | throw new FebsException("参数错误"); |
| | | } |
| | | return new FebsResponse().success(); |
| | | } |
| | | |
| | | public static List<List<String>> partitionList(List<String> originalList, int partitionSize) { |
| | | List<List<String>> partitionedList = new ArrayList<>(); |
| | | int size = originalList.size(); |