优化待解冻, 平台杂项配置优化

This commit is contained in:
yml2213
2026-08-22 20:11:01 +08:00
parent 1b8fdff162
commit b4918769f1
5 changed files with 183 additions and 64 deletions
@@ -217,9 +217,13 @@ export async function createWorkerWithdrawRequest(
export async function settleDueDepositUnfreezes(
options: { limit?: number; workerId?: number } = {},
) {
// 到期判定按当前解冻天数回溯:管理员调小财务配置后,存量待解冻按新天数提前视为到期,
// 否则入队时的旧天数会让"扫描 0 笔"一直持续到原到期时间。
const retroactiveDays = getWorkerFinanceConfig().depositUnfreezeDays
const due = await listDueDepositUnfreezes({
limit: Math.max(1, Number(options.limit || 100)),
workerId: Number(options.workerId || 0),
retroactiveDays,
})
let processedCount = 0
for (const unfreeze of due) {