xiaoyong931011
2022-12-02 ff6b4ca2a45e57df38f5d6e5f55456854f7d455c
src/main/java/cc/mrbird/febs/dapp/service/impl/DappMemberServiceImpl.java
@@ -201,7 +201,23 @@
        if (currentUser.getDeptId() == null) {
            member.setCurrentUser(currentUser.getUserId());
        }
        return dappMemberDao.selectInPage(member, page);
        IPage<DappMemberEntity> dappMemberEntityIPage = dappMemberDao.selectInPage(member, page);
        List<DappMemberEntity> records = dappMemberEntityIPage.getRecords();
        if(CollUtil.isNotEmpty(records)){
            for(DappMemberEntity memberEntity : records){
                Long memberId = memberEntity.getId();
                DappSystemProfit dappSystemProfit = dappSystemProfitDao.selectByMemberIdAndState(memberId,DappSystemProfit.STATE_IN);
                memberEntity.setSystemProfitId(ObjectUtil.isEmpty(dappSystemProfit) ? 0L : dappSystemProfit.getId());
                BigDecimal directProfit = dappFundFlowDao.selectSumAmountByMemberIdAndTypeAndStatus(memberId,3,2);
                memberEntity.setDirectProfit(directProfit);
                BigDecimal levelProfit = dappFundFlowDao.selectSumAmountByMemberIdAndTypeAndStatus(memberId,4,2);
                memberEntity.setLevelProfit(levelProfit);
                BigDecimal luckyProfit = dappFundFlowDao.selectSumAmountByMemberIdAndTypeAndStatus(memberId,7,2);
                memberEntity.setLuckyProfit(luckyProfit);
            }
        }
        return dappMemberEntityIPage;
    }
    @Override