details 新增admin类型
This commit is contained in:
parent
7b3f902285
commit
f34fa2c20c
@ -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.SalaryRunningWaterDTO;
|
||||||
import com.red.circle.wallet.inner.model.dto.UserBankRunningWaterDTO;
|
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.dto.UserBankWithdrawMoneyApplyDTO;
|
||||||
|
import com.red.circle.wallet.inner.model.enums.SalaryEvent;
|
||||||
import com.red.circle.wallet.inner.model.enums.UserBankWaterEvent;
|
import com.red.circle.wallet.inner.model.enums.UserBankWaterEvent;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@ -145,7 +146,7 @@ public class BdDetailsQryExe {
|
|||||||
item.setTimeText(TIME_FORMATTER.format(water.getCreatedAt()));
|
item.setTimeText(TIME_FORMATTER.format(water.getCreatedAt()));
|
||||||
|
|
||||||
// Cash out (提现)
|
// Cash out (提现)
|
||||||
if ("WITHDRAW".equals(event)) {
|
if (SalaryEvent.WITHDRAW.getCode().equals(event)) {
|
||||||
if (!shouldIncludeType(filterType, "CASH_OUT")) {
|
if (!shouldIncludeType(filterType, "CASH_OUT")) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -187,7 +188,7 @@ public class BdDetailsQryExe {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Transfer (转账)
|
// Transfer (转账)
|
||||||
if ("SALARY_TRANSFER".equals(event)) {
|
if (SalaryEvent.SALARY_TRANSFER.getCode().equals(event)) {
|
||||||
if (!shouldIncludeType(filterType, "TRANSFER")) {
|
if (!shouldIncludeType(filterType, "TRANSFER")) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -207,7 +208,7 @@ public class BdDetailsQryExe {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Exchange coins (兑换金币)
|
// Exchange coins (兑换金币)
|
||||||
if ("SALARY_EXCHANGE".equals(event)) {
|
if (SalaryEvent.SALARY_EXCHANGE.getCode().equals(event)) {
|
||||||
if (!shouldIncludeType(filterType, "EXCHANGE")) {
|
if (!shouldIncludeType(filterType, "EXCHANGE")) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -220,7 +221,7 @@ public class BdDetailsQryExe {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// BD 收入
|
// BD 收入
|
||||||
if ("SALARY_BD".equals(event)) {
|
if (SalaryEvent.SALARY_BD.getCode().equals(event)) {
|
||||||
if (!shouldIncludeType(filterType, "BD_SALARY_SETTLEMENT")) {
|
if (!shouldIncludeType(filterType, "BD_SALARY_SETTLEMENT")) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -232,7 +233,7 @@ public class BdDetailsQryExe {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// BDLEADER 收入
|
// BDLEADER 收入
|
||||||
if ("SALARY_BD_LEADER".equals(event)) {
|
if (SalaryEvent.SALARY_BD_LEADER.getCode().equals(event)) {
|
||||||
if (!shouldIncludeType(filterType, "BD_LEADER_SALARY_SETTLEMENT")) {
|
if (!shouldIncludeType(filterType, "BD_LEADER_SALARY_SETTLEMENT")) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -243,6 +244,18 @@ public class BdDetailsQryExe {
|
|||||||
return item;
|
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;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -150,7 +150,7 @@ public class AdminSalarySettlementServiceImpl implements AdminSalarySettlementSe
|
|||||||
// 6. 如果工资大于 0,则发放工资
|
// 6. 如果工资大于 0,则发放工资
|
||||||
if (record.getTotalSalary().compareTo(BigDecimal.ZERO) > 0) {
|
if (record.getTotalSalary().compareTo(BigDecimal.ZERO) > 0) {
|
||||||
try {
|
try {
|
||||||
// issueSalary(adminUserId, record);
|
issueSalary(adminUserId, record);
|
||||||
log.info("管理员 {} 工资发放成功,金额:{} USD", adminUserId, record.getTotalSalary());
|
log.info("管理员 {} 工资发放成功,金额:{} USD", adminUserId, record.getTotalSalary());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("管理员 {} 工资发放失败", adminUserId, e);
|
log.error("管理员 {} 工资发放失败", adminUserId, e);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user