diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/team/bd/query/BdDetailsQryExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/team/bd/query/BdDetailsQryExe.java index d99cb51b..52c204dd 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/team/bd/query/BdDetailsQryExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/team/bd/query/BdDetailsQryExe.java @@ -20,6 +20,7 @@ import com.red.circle.wallet.inner.model.dto.FreightBalanceRunningWaterDTO; import com.red.circle.wallet.inner.model.dto.SalaryRunningWaterDTO; import com.red.circle.wallet.inner.model.dto.UserBankRunningWaterDTO; import com.red.circle.wallet.inner.model.dto.UserBankWithdrawMoneyApplyDTO; +import com.red.circle.wallet.inner.model.enums.SalaryEvent; import com.red.circle.wallet.inner.model.enums.UserBankWaterEvent; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -145,7 +146,7 @@ public class BdDetailsQryExe { item.setTimeText(TIME_FORMATTER.format(water.getCreatedAt())); // Cash out (提现) - if ("WITHDRAW".equals(event)) { + if (SalaryEvent.WITHDRAW.getCode().equals(event)) { if (!shouldIncludeType(filterType, "CASH_OUT")) { return null; } @@ -187,7 +188,7 @@ public class BdDetailsQryExe { } // Transfer (转账) - if ("SALARY_TRANSFER".equals(event)) { + if (SalaryEvent.SALARY_TRANSFER.getCode().equals(event)) { if (!shouldIncludeType(filterType, "TRANSFER")) { return null; } @@ -207,7 +208,7 @@ public class BdDetailsQryExe { } // Exchange coins (兑换金币) - if ("SALARY_EXCHANGE".equals(event)) { + if (SalaryEvent.SALARY_EXCHANGE.getCode().equals(event)) { if (!shouldIncludeType(filterType, "EXCHANGE")) { return null; } @@ -220,7 +221,7 @@ public class BdDetailsQryExe { } // BD 收入 - if ("SALARY_BD".equals(event)) { + if (SalaryEvent.SALARY_BD.getCode().equals(event)) { if (!shouldIncludeType(filterType, "BD_SALARY_SETTLEMENT")) { return null; } @@ -232,7 +233,7 @@ public class BdDetailsQryExe { } // BDLEADER 收入 - if ("SALARY_BD_LEADER".equals(event)) { + if (SalaryEvent.SALARY_BD_LEADER.getCode().equals(event)) { if (!shouldIncludeType(filterType, "BD_LEADER_SALARY_SETTLEMENT")) { return null; } @@ -243,6 +244,18 @@ public class BdDetailsQryExe { return item; } + // ADMIN 收入 + if (SalaryEvent.SALARY_ADMIN.getCode().equals(event)) { + if (!shouldIncludeType(filterType, "ADMIN_SALARY_SETTLEMENT")) { + return null; + } + item.setType("ADMIN_INCOME"); + item.setTypeText("Admin's income"); + item.setAmount(water.getAmount()); + item.setAmountText("+$" + water.getAmount().toString()); + return item; + } + return null; } diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/AdminSalarySettlementServiceImpl.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/AdminSalarySettlementServiceImpl.java index 18f078b5..3b01bbcb 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/AdminSalarySettlementServiceImpl.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/AdminSalarySettlementServiceImpl.java @@ -150,7 +150,7 @@ public class AdminSalarySettlementServiceImpl implements AdminSalarySettlementSe // 6. 如果工资大于 0,则发放工资 if (record.getTotalSalary().compareTo(BigDecimal.ZERO) > 0) { try { -// issueSalary(adminUserId, record); + issueSalary(adminUserId, record); log.info("管理员 {} 工资发放成功,金额:{} USD", adminUserId, record.getTotalSalary()); } catch (Exception e) { log.error("管理员 {} 工资发放失败", adminUserId, e);