fix(ecom-script): 刷单单量按店×天控制,规格随机分配并修正预计条数

This commit is contained in:
小蟑螂
2026-05-30 02:18:33 +08:00
parent ede706a8e0
commit f888a4ac1b
4 changed files with 1110 additions and 18 deletions
+2 -1
View File
@@ -115,7 +115,8 @@ async function seedHandler(opts) {
const dayCount = Math.floor((endDate - startDate) / 86400000) + 1;
const shopDailyAvg = (dailyMin + dailyMax) / 2;
const estimatedTotal = Math.ceil(specs.length * shops.length * dayCount * shopDailyAvg);
// 预计总量 = 店数 × 天数 × 单店日均(与规格数量无关)
const estimatedTotal = Math.ceil(shops.length * dayCount * shopDailyAvg);
console.log(`\n公司: ${company.name} (${company.id})`);
console.log(`时间: ${formatDate(startDate)} ~ ${formatDate(endDate)} (${dayCount} 天)`);