优化待解冻, 平台杂项配置优化
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user