修复配置值前导零bug:updateAreaConfig去除前导0

- Integer.parseInt去前导零:01→1,防止静默失败
This commit is contained in:
2026-06-27 20:14:26 +08:00
parent d0c4f45928
commit 8c06b48989
@@ -7399,6 +7399,8 @@ public class AreaProtection implements Listener {
*/
private void updateAreaConfig(String key, String value) {
if (dbConnection == null) return;
// ★ 去除前导零:01 → 1,防止静默失败
try { value = String.valueOf(Integer.parseInt(value.trim())); } catch (Exception ignored) {}
try {
PreparedStatement ps = dbConnection.prepareStatement(
"INSERT INTO area_config (key, value) VALUES (?, ?) "