feat: persist targeted momo review candidates
Some checks failed
CD Pipeline / deploy (push) Failing after 35s

This commit is contained in:
OoO
2026-06-19 02:43:34 +08:00
parent bed4488a72
commit 4b0a331d98
8 changed files with 291 additions and 3 deletions

View File

@@ -1196,6 +1196,10 @@
<strong id="growthNeedsMapping"></strong>
<span>無法比價</span>
</div>
<div class="growth-metric">
<strong id="growthReviewCandidateCount"></strong>
<span>待確認</span>
</div>
</div>
<p class="growth-action-hint" id="growthActionHint">正在判斷今天優先處理順序...</p>
<p class="growth-data-summary" id="growthDataSourceSummary">來源整理中...</p>
@@ -1724,6 +1728,7 @@ async function loadGrowthOps(forceRefresh = false) {
document.getElementById('growthCandidateCount').textContent = (stats.candidate_count || 0).toLocaleString();
document.getElementById('growthMappedCount').textContent = (stats.mapped_count || 0).toLocaleString();
document.getElementById('growthNeedsMapping').textContent = (stats.needs_mapping_count || 0).toLocaleString();
document.getElementById('growthReviewCandidateCount').textContent = (stats.review_candidate_count || 0).toLocaleString();
renderOpsCommandDashboard(stats, scope);
renderGrowthActionHint(stats);
renderGrowthDataSourceSummary(stats);
@@ -1768,6 +1773,7 @@ function renderGrowthActionHint(stats) {
const candidateCount = Number(stats.candidate_count || 0);
const mappedCount = Number(stats.mapped_count || 0);
const needsMapping = Number(stats.needs_mapping_count || 0);
const reviewCandidateCount = Number(stats.review_candidate_count || 0);
if (!candidateCount) {
hint.textContent = '還不能產生今日清單,原因是缺少最新 PChome 業績。';
@@ -1779,6 +1785,11 @@ function renderGrowthActionHint(stats) {
return;
}
if (needsMapping > 0 && reviewCandidateCount > 0) {
hint.textContent = `先處理 ${mappedCount.toLocaleString()} 件可立即處理商品;另有 ${reviewCandidateCount.toLocaleString()} 筆候選等人工確認。`;
return;
}
if (needsMapping > 0) {
hint.textContent = `先處理 ${mappedCount.toLocaleString()} 件可立即處理商品,再補 ${needsMapping.toLocaleString()} 件比價資料。`;
return;