feat(打手): 支持个人追加免押额度

This commit is contained in:
yml2213
2026-08-28 21:36:54 +08:00
parent 5d5d63bb59
commit f20ff3018f
18 changed files with 282 additions and 12 deletions
@@ -55,6 +55,18 @@ test('立即抢单的份数、报酬和保证金都按剩余数量计算', () =>
assert.equal(resolveHallDepositAmount(order), 1_200)
})
test('拼单大厅保证金先按个人份额计算再抵扣免押额度', () => {
assert.equal(
resolveHallDepositAmount({
freezeDepositAmount: 7_000,
depositFreeAmount: 3_000,
sharing: { enabled: true, totalQuantity: 10 },
sharingProgress: { joinedQuantity: 5 },
}),
2_000,
)
})
test('拼单份数用完后剩余报酬和保证金归零', () => {
const order = {
rewardAmount: 10_500,