details 新增admin类型

This commit is contained in:
tianfeng 2025-12-15 16:27:12 +08:00
parent 7b3f902285
commit f34fa2c20c
2 changed files with 19 additions and 6 deletions

View File

@ -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;
}

View File

@ -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);