linux平台的多端处理
This commit is contained in:
@@ -1476,8 +1476,9 @@ public class DatabaseStore {
|
|||||||
try {
|
try {
|
||||||
connection = DBUtil.getConnection();
|
connection = DBUtil.getConnection();
|
||||||
String sql;
|
String sql;
|
||||||
if (platform == ProtoConstants.Platform.Platform_Windows || platform == ProtoConstants.Platform.Platform_OSX
|
if (platform == ProtoConstants.Platform.Platform_Windows || platform == ProtoConstants.Platform.Platform_OSX || platform == ProtoConstants.Platform.Platform_Linux) {
|
||||||
|| platform == ProtoConstants.Platform.Platform_iOS || platform == ProtoConstants.Platform.Platform_Android) {
|
sql = "update t_user_session set `_deleted` = ?, `_token` = ?, `_voip_token` = ?, `_dt` = ? where `_uid`=? and (`_platform` = ? or `_platform` = ? or `_platform` = ?) and `_cid` <> ? and `_deleted` = 0";
|
||||||
|
} else if(platform == ProtoConstants.Platform.Platform_iOS || platform == ProtoConstants.Platform.Platform_Android) {
|
||||||
sql = "update t_user_session set `_deleted` = ?, `_token` = ?, `_voip_token` = ?, `_dt` = ? where `_uid`=? and (`_platform` = ? or `_platform` = ?) and `_cid` <> ? and `_deleted` = 0";
|
sql = "update t_user_session set `_deleted` = ?, `_token` = ?, `_voip_token` = ?, `_dt` = ? where `_uid`=? and (`_platform` = ? or `_platform` = ?) and `_cid` <> ? and `_deleted` = 0";
|
||||||
} else {
|
} else {
|
||||||
sql = "update t_user_session set `_deleted` = ?, `_token` = ?, `_voip_token` = ?, `_dt` = ? where `_uid`=? and `_platform` = ? and `_cid` <> ? and `_deleted` = 0";
|
sql = "update t_user_session set `_deleted` = ?, `_token` = ?, `_voip_token` = ?, `_dt` = ? where `_uid`=? and `_platform` = ? and `_cid` <> ? and `_deleted` = 0";
|
||||||
@@ -1493,9 +1494,10 @@ public class DatabaseStore {
|
|||||||
|
|
||||||
statement.setString(index++, uid);
|
statement.setString(index++, uid);
|
||||||
|
|
||||||
if (platform == ProtoConstants.Platform.Platform_Windows || platform == ProtoConstants.Platform.Platform_OSX) {
|
if (platform == ProtoConstants.Platform.Platform_Windows || platform == ProtoConstants.Platform.Platform_OSX || platform == ProtoConstants.Platform.Platform_Linux) {
|
||||||
statement.setInt(index++, ProtoConstants.Platform.Platform_Windows);
|
statement.setInt(index++, ProtoConstants.Platform.Platform_Windows);
|
||||||
statement.setInt(index++, ProtoConstants.Platform.Platform_OSX);
|
statement.setInt(index++, ProtoConstants.Platform.Platform_OSX);
|
||||||
|
statement.setInt(index++, ProtoConstants.Platform.Platform_Linux);
|
||||||
} else if(platform == ProtoConstants.Platform.Platform_iOS || platform == ProtoConstants.Platform.Platform_Android) {
|
} else if(platform == ProtoConstants.Platform.Platform_iOS || platform == ProtoConstants.Platform.Platform_Android) {
|
||||||
statement.setInt(index++, ProtoConstants.Platform.Platform_iOS);
|
statement.setInt(index++, ProtoConstants.Platform.Platform_iOS);
|
||||||
statement.setInt(index++, ProtoConstants.Platform.Platform_Android);
|
statement.setInt(index++, ProtoConstants.Platform.Platform_Android);
|
||||||
|
|||||||
@@ -381,8 +381,8 @@ public class MemorySessionStore implements ISessionsStore {
|
|||||||
if (s.getPlatform() == ProtoConstants.Platform.Platform_Android || s.getPlatform() == ProtoConstants.Platform.Platform_iOS) {
|
if (s.getPlatform() == ProtoConstants.Platform.Platform_Android || s.getPlatform() == ProtoConstants.Platform.Platform_iOS) {
|
||||||
remove = true;
|
remove = true;
|
||||||
}
|
}
|
||||||
} else if(platform == ProtoConstants.Platform.Platform_OSX || platform == ProtoConstants.Platform.Platform_Windows) {
|
} else if(platform == ProtoConstants.Platform.Platform_OSX || platform == ProtoConstants.Platform.Platform_Windows || platform == ProtoConstants.Platform.Platform_Linux) {
|
||||||
if (s.getPlatform() == ProtoConstants.Platform.Platform_OSX || s.getPlatform() == ProtoConstants.Platform.Platform_Windows) {
|
if (s.getPlatform() == ProtoConstants.Platform.Platform_OSX || s.getPlatform() == ProtoConstants.Platform.Platform_Windows || platform == ProtoConstants.Platform.Platform_Linux) {
|
||||||
remove = true;
|
remove = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -45,6 +45,8 @@ public class ProtoConstants {
|
|||||||
int Platform_Windows = 3;
|
int Platform_Windows = 3;
|
||||||
int Platform_OSX = 4;
|
int Platform_OSX = 4;
|
||||||
int Platform_WEB = 5;
|
int Platform_WEB = 5;
|
||||||
|
int Platform_WX = 6;
|
||||||
|
int Platform_Linux = 7;
|
||||||
}
|
}
|
||||||
|
|
||||||
//message NotifyMessage & PullMessageRequest -> type
|
//message NotifyMessage & PullMessageRequest -> type
|
||||||
|
|||||||
Reference in New Issue
Block a user