|
|
@@ -18,7 +18,7 @@ public class UserAutoLogOut extends BaseClass implements Runnable {
|
|
|
@Override
|
|
|
public void run() {
|
|
|
try {
|
|
|
- if (new SQLiteJDBC().checkServicesUsed("UserAutoLogOut",false)) {
|
|
|
+ if (new SQLiteJDBC().checkServicesUsed("UserAutoLogOut", false)) {
|
|
|
accountExpiration();
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
@@ -33,16 +33,14 @@ public class UserAutoLogOut extends BaseClass implements Runnable {
|
|
|
DBConnect dbConnect = new DBConnect();
|
|
|
SQLFactory factory = new SQLFactory(this, "ʧЧÕ˺Ųéѯ");
|
|
|
Rows rows = dbConnect.runSqlQuery(factory.getSQL());
|
|
|
- ArrayList<String> sqllist = new ArrayList<>();
|
|
|
for (Row row : rows) {
|
|
|
- String userid = row.getString("userid");
|
|
|
+ long userid = row.getLong("userid");
|
|
|
if (parameter.userIdList.containsKey(userid)) {
|
|
|
String token = parameter.userIdList.get(userid).getString("token");
|
|
|
parameter.tokenlist.remove(token);
|
|
|
parameter.userIdList.remove(userid);
|
|
|
- sqllist.add("update tenterprise_users set accesstoken=null where accesstoken='" + token + "'");
|
|
|
+ dbConnect.runSqlUpdate("update tenterprise_users set accesstoken=null where tenterprise_userid='" + userid + "'");
|
|
|
}
|
|
|
}
|
|
|
- new DBConnect().runSqlUpdate(sqllist);
|
|
|
}
|
|
|
}
|