fix: 第1批 M2、M3、M16、M23 导入与展示类缺陷
Some checks failed
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Failing after 8h37m36s

- M2 批量换绑表头改为“平台登录账号”,只认手机号,细分格式、不存在、多匹配、非平台、已禁用失败原因
- M3 后台订单列表与详情返回 C 端在线购买的交易流水号、支付渠道、商户名称,详情新增全部支付单 payments
- M16 预警规则不再返回 real_data_mb,预警列表/详情新增 threshold_mb,导出末列追加“阈值流量(MB)”
- M23 设备导入 IMEI 必填,空 IMEI 行记为失败
- OpenSpec Change fix-august-iteration-follow-up-gaps:13/18,导入任务、导出任务的 Worker 端到端验证与前端/运营通知待部署后完成
This commit is contained in:
邹进
2026-10-11 23:49:29 +09:00
parent 260fec7114
commit 25c081fe60
24 changed files with 553 additions and 42 deletions

View File

@@ -46,6 +46,11 @@ func Decide(usedMB, limitMB, thresholdBasisPoints int64) (bool, int64) {
return hit, ratioBasisPoints
}
// ThresholdMB 返回阈值对应流量:真流量额度汇总 × 阈值百分比 ÷ 100,保留两位小数,口径与额度一致(含加油包)。
func ThresholdMB(limitMB int64, thresholdPercent float64) float64 {
return math.Round(float64(limitMB)*NormalizeThresholdPercent(thresholdPercent)) / 100
}
// PercentFromBasisPoints 把万分比换算为保留两位小数的百分比展示值。
func PercentFromBasisPoints(basisPoints int64) float64 {
return float64(basisPoints) / 100