Kaynağa Gözat

1.控制台钱包机构可提现金额

wuhp 1 yıl önce
ebeveyn
işleme
5a5f9c2bcb

+ 5 - 2
src/main/java/com/ydtech/modules/admin/service/impl/DeptBalanceServiceImpl.java

@@ -99,12 +99,13 @@ public class DeptBalanceServiceImpl implements DeptBalanceService {
                     String userId = itemLeader.getUserId();
                     //已提现抽成费用
                     BigDecimal historyFee = BigDecimal.ZERO;
+                    BigDecimal cashFee = BigDecimal.ZERO;
 //                    SysPartnerAccount sysPartnerAccount = sysPartnerAccountMapper.selectOne(new LambdaQueryWrapper<SysPartnerAccount>().eq(SysPartnerAccount::getUserId, userId));
                     itemLeader.setBeginDate(deptBalanceVo.getBeginDate());
                     itemLeader.setEndDate(deptBalanceVo.getEndDate());
 
                     HashMap<String,BigDecimal>totalAmountMap =sysPremiumDetailsMapper.getTotalAmount(itemLeader);
-//                    SysPartnerAccount sysPartnerAccount =sysPartnerAccountMapper.getByDeptBalanceDto(itemLeader);
+                    SysPartnerAccount sysPartnerAccount =sysPartnerAccountMapper.getByDeptBalanceDto(itemLeader);
                     if (totalAmountMap != null) {
                         BigDecimal sumPremium = totalAmountMap.get("totalAmount");
                         BigDecimal extractFee = totalAmountMap.get("extractFeeAmount");
@@ -127,12 +128,14 @@ public class DeptBalanceServiceImpl implements DeptBalanceService {
                         if (sysAgencyFeeApprovals.size() > 0) {
                             for (SysAgencyFeeApproval sysAgencyFeeApproval : sysAgencyFeeApprovals) {
                                 historyFee = historyFee.add(sysAgencyFeeApproval.getHistoryFee());
+                                cashFee = cashFee.add(sysAgencyFeeApproval.getCashFee());
                             }
                         }
                         //已提现
                         itemLeader.setWithdrawn(historyFee);
                         //可提现 = 总抽成-已提现
-                        itemLeader.setNotWithdrawn(extractFee.subtract(historyFee));
+                        itemLeader.setNotWithdrawn(sysPartnerAccount.getCashFee());
+
                     }else {
                         itemLeader.setDeptManagementFee(BigDecimal.ZERO);
                         itemLeader.setTotalIncome(BigDecimal.ZERO);