fix: 完成商务迁移复核与接口优化并清理历史资料

This commit is contained in:
Yvan
2026-11-04 14:45:02 +08:00
parent 5a96be6a79
commit 297e80827d
176 changed files with 6803 additions and 6002 deletions
+5 -5
View File
@@ -200,12 +200,12 @@ func buildRankingItems(kind RankingKind, metric string, current, previous map[An
if err != nil {
return nil, err
}
if metric == "rate" || valid {
// 四个榜单统一使用相对上期的增长率。上期为零或无有效
// 活跃基数时不能计算环比,保留 nil 供页面显示无可比数据。
if valid && prior.Sign() > 0 {
change := new(big.Rat).Sub(value, prior)
if metric != "rate" {
change.Mul(change, big.NewRat(100, 1))
change.Quo(change, prior)
}
change.Mul(change, big.NewRat(100, 1))
change.Quo(change, prior)
item.MoM = stringPointer(portraitDecimal(change, 2))
rounded, _ := portraitNumber(*item.MoM)
status := 0