wzy
2022-12-04 b8670e655a7b0aa581e49f448f3b0661ada77324
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