解决广播没有发送消息给未登录用户的问题

This commit is contained in:
heavyrian2012
2023-12-02 23:03:00 +08:00
parent 90e89978aa
commit 594103e06b
5 changed files with 26 additions and 5 deletions
@@ -3000,17 +3000,20 @@ public class DatabaseStore {
return outList;
}
Set<String> getAllEnds() {
Set<String> getAllEnds(boolean fromUserTable) {
Connection connection = null;
PreparedStatement statement = null;
ResultSet rs = null;
try {
connection = DBUtil.getConnection();
String sql = "select distinct(`_uid`) from t_user_session where `_deleted` = 0";
String sql;
if(fromUserTable) {
sql = "select distinct(`_uid`) from t_user_session";
} else {
sql = "select distinct(`_uid`) from t_user where `_deleted` = 0 and `_type` <> 1 and `_type` <> 2";
}
statement = connection.prepareStatement(sql);
rs = statement.executeQuery();
Set<String> out = new HashSet<>();
while (rs.next()) {