修复配置值前导零bug:updateAreaConfig去除前导0
- Integer.parseInt去前导零:01→1,防止静默失败
This commit is contained in:
@@ -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 (?, ?) "
|
||||
|
||||
Reference in New Issue
Block a user