This commit is contained in:
2025-09-16 17:39:51 +08:00
parent 14a3c39f9d
commit 61476e2b8e
9 changed files with 768 additions and 722 deletions

View File

@@ -1046,9 +1046,9 @@ class MatchingService {
}
// 确保至少有最小笔数
if (allocations.length < minTransfers) {
throw new Error(`无法生成足够的分配:需要至少${minTransfers}笔,但只能生成${allocations.length}`);
}
// if (allocations.length < minTransfers) {
// throw new Error(`无法生成足够的分配:需要至少${minTransfers}笔,但只能生成${allocations.length}笔`);
// }
// 精确控制总金额,避免超出预期
const currentTotal = allocations.reduce((sum, a) => sum + a.amount, 0);