提交
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user