This commit is contained in:
@@ -11933,7 +11933,10 @@ public class WebManager {
|
|||||||
DatabaseManager db = plugin.getDb();
|
DatabaseManager db = plugin.getDb();
|
||||||
if (db == null) return;
|
if (db == null) return;
|
||||||
|
|
||||||
// 收集所有非默认积分的玩家(默认100分不推,减少数据量)
|
// 收集所有玩家的积分镜像(★ 第98批 #402:不再跳过默认 100 分的玩家)
|
||||||
|
// 旧过滤 credit_score != 100 会让「分数恰好恢复/调整回 100」的玩家从推送集消失,
|
||||||
|
// PHP 面板镜像停留在旧值;users 表很小(几十人),全量推的开销可忽略,
|
||||||
|
// 签名对比逻辑不变(数据没变照样跳过推送)。
|
||||||
// ★ 第58批-问题1修复:db.getConnection() 返回全局单例连接,不能 try-with-resources 关闭!
|
// ★ 第58批-问题1修复:db.getConnection() 返回全局单例连接,不能 try-with-resources 关闭!
|
||||||
// 之前 try (Connection conn = db.getConnection(); ...) 会在块退出时 close() 掉单例连接,
|
// 之前 try (Connection conn = db.getConnection(); ...) 会在块退出时 close() 掉单例连接,
|
||||||
// 导致下次访问触发"数据库连接已自动重建",断链频率大的根源。
|
// 导致下次访问触发"数据库连接已自动重建",断链频率大的根源。
|
||||||
@@ -11942,7 +11945,7 @@ public class WebManager {
|
|||||||
Connection conn = db.getConnection();
|
Connection conn = db.getConnection();
|
||||||
try (Statement st = conn.createStatement();
|
try (Statement st = conn.createStatement();
|
||||||
ResultSet rs = st.executeQuery(
|
ResultSet rs = st.executeQuery(
|
||||||
"SELECT player_name, credit_score FROM users WHERE credit_score IS NOT NULL AND credit_score != 100 ORDER BY player_name")) {
|
"SELECT player_name, credit_score FROM users WHERE credit_score IS NOT NULL ORDER BY player_name")) {
|
||||||
while (rs.next()) {
|
while (rs.next()) {
|
||||||
playersObj.addProperty(rs.getString("player_name"), rs.getDouble("credit_score"));
|
playersObj.addProperty(rs.getString("player_name"), rs.getDouble("credit_score"));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user