第十八批遗留修复:播报模式填0仍播报——parseMode把0并入false映射成2(由远到近),拆为0=关闭/false=由远到近,加「关闭」容错
Check Source / check (push) Successful in 3s
Auto Release / build (push) Successful in 2m28s
Simple Test / test (push) Successful in 1s
Test Env / test (push) Successful in 1s

This commit is contained in:
youpaishidifu
2026-10-15 13:03:28 +08:00
parent c83eaad23f
commit 9bc8aaac37
@@ -263,10 +263,15 @@ public class BanBroadcastManager {
private int parseMode(String s) {
if (s == null) return 1;
String v = s.trim();
if (v.equals("0") || v.equalsIgnoreCase("false")) return 2; // false=由远到近
if (v.equals("1") || v.equalsIgnoreCase("true")) return 1; // true=由近到远
if (v.contains("近到远")) return 1; // 由近到远
if (v.contains("远到近")) return 2; // 由远到近
// ★ 第十八批遗留修复:0 = 关闭(表格文档语义)。
// 原实现把 "0" 和 "false" 合并映射成 2(由远到近),
// 导致表格填 0 永远关不掉、一直播报 —— 现拆开各归各位。
if (v.equals("0")) return 0; // 0=关闭
if (v.equalsIgnoreCase("false")) return 2; // false=由远到近
if (v.equals("1") || v.equalsIgnoreCase("true")) return 1; // true=由近到远
if (v.contains("关闭")) return 0; // 容错:直接写「关闭」
if (v.contains("近到远")) return 1; // 由近到远
if (v.contains("远到近")) return 2; // 由远到近
return 1;
}