xiaoyong931011
2023-08-11 75cd0d8aff31f28596a5b52c2686bc2afee46589
src/main/java/cc/mrbird/febs/dapp/service/impl/DappMemberServiceImpl.java
@@ -555,7 +555,7 @@
        if(ObjectUtil.isEmpty(dappMemberEntity)) {
            return new FebsResponse().fail().message("会员信息不存在");
        }
        dappMemberEntity.setActiveStatus(1);
        dappMemberEntity.setActiveStatus(2);
        dappMemberDao.updateById(dappMemberEntity);
        return new FebsResponse().success();
    }
@@ -823,6 +823,56 @@
        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();