diff --git a/repository/com/xinbida/wukongim/WKIMLib_loca/1.0.1/WKIMLib_loca-1.0.1.aar b/repository/com/xinbida/wukongim/WKIMLib_loca/1.0.1/WKIMLib_loca-1.0.1.aar
index a94bd09..d527715 100644
Binary files a/repository/com/xinbida/wukongim/WKIMLib_loca/1.0.1/WKIMLib_loca-1.0.1.aar and b/repository/com/xinbida/wukongim/WKIMLib_loca/1.0.1/WKIMLib_loca-1.0.1.aar differ
diff --git a/repository/com/xinbida/wukongim/WKIMLib_loca/1.0.1/WKIMLib_loca-1.0.1.aar.md5 b/repository/com/xinbida/wukongim/WKIMLib_loca/1.0.1/WKIMLib_loca-1.0.1.aar.md5
index 0fd0eaf..ae2f39d 100644
--- a/repository/com/xinbida/wukongim/WKIMLib_loca/1.0.1/WKIMLib_loca-1.0.1.aar.md5
+++ b/repository/com/xinbida/wukongim/WKIMLib_loca/1.0.1/WKIMLib_loca-1.0.1.aar.md5
@@ -1 +1 @@
-ba3da42c631a8f1da07c6d50a61fc4cc
\ No newline at end of file
+3f93544eb1654acb3a4fb20f20a2e60e
\ No newline at end of file
diff --git a/repository/com/xinbida/wukongim/WKIMLib_loca/1.0.1/WKIMLib_loca-1.0.1.aar.sha1 b/repository/com/xinbida/wukongim/WKIMLib_loca/1.0.1/WKIMLib_loca-1.0.1.aar.sha1
index b3ffc3f..8d9d1e3 100644
--- a/repository/com/xinbida/wukongim/WKIMLib_loca/1.0.1/WKIMLib_loca-1.0.1.aar.sha1
+++ b/repository/com/xinbida/wukongim/WKIMLib_loca/1.0.1/WKIMLib_loca-1.0.1.aar.sha1
@@ -1 +1 @@
-5bf4fac6da79c9e3e6d7c5eeacd1608bb2fe643f
\ No newline at end of file
+dc3a097ac17b4302a211adcf10768c4a4ff9bf7b
\ No newline at end of file
diff --git a/repository/com/xinbida/wukongim/WKIMLib_loca/1.0.1/WKIMLib_loca-1.0.1.aar.sha256 b/repository/com/xinbida/wukongim/WKIMLib_loca/1.0.1/WKIMLib_loca-1.0.1.aar.sha256
index 4faf5b6..66ee318 100644
--- a/repository/com/xinbida/wukongim/WKIMLib_loca/1.0.1/WKIMLib_loca-1.0.1.aar.sha256
+++ b/repository/com/xinbida/wukongim/WKIMLib_loca/1.0.1/WKIMLib_loca-1.0.1.aar.sha256
@@ -1 +1 @@
-a8fb0c37de52d4c533b511a742272c4cb7ba9b6bd2b62867fa5c1475429baf08
\ No newline at end of file
+22a85d8c1b276d428decdff1878bda476e11550fed96879221aef5998bba130a
\ No newline at end of file
diff --git a/repository/com/xinbida/wukongim/WKIMLib_loca/1.0.1/WKIMLib_loca-1.0.1.aar.sha512 b/repository/com/xinbida/wukongim/WKIMLib_loca/1.0.1/WKIMLib_loca-1.0.1.aar.sha512
index f8e7957..fd68cbd 100644
--- a/repository/com/xinbida/wukongim/WKIMLib_loca/1.0.1/WKIMLib_loca-1.0.1.aar.sha512
+++ b/repository/com/xinbida/wukongim/WKIMLib_loca/1.0.1/WKIMLib_loca-1.0.1.aar.sha512
@@ -1 +1 @@
-f82ad34ba5827c7fa14d4cd66f71523e6ea3573ae0f26eb7fdc2df039d05643a49a84d54fa8e1590f81978fca3a5604c6ba6d56fe47f3983134ae07e83d86962
\ No newline at end of file
+571205bfba040264aac10c072ec7feb133445abd67b7da4e9f1f51d2efb7ee233a2cf400ce6e511205bc1b81b744ffdae99eb5d8345aabe4818885f04aa5fc7e
\ No newline at end of file
diff --git a/repository/com/xinbida/wukongim/WKIMLib_loca/maven-metadata.xml b/repository/com/xinbida/wukongim/WKIMLib_loca/maven-metadata.xml
index b07295d..75d4f24 100644
--- a/repository/com/xinbida/wukongim/WKIMLib_loca/maven-metadata.xml
+++ b/repository/com/xinbida/wukongim/WKIMLib_loca/maven-metadata.xml
@@ -8,6 +8,6 @@
1.0.1
- 20230718150400
+ 20230719144158
diff --git a/repository/com/xinbida/wukongim/WKIMLib_loca/maven-metadata.xml.md5 b/repository/com/xinbida/wukongim/WKIMLib_loca/maven-metadata.xml.md5
index 9fb4b38..7c49059 100644
--- a/repository/com/xinbida/wukongim/WKIMLib_loca/maven-metadata.xml.md5
+++ b/repository/com/xinbida/wukongim/WKIMLib_loca/maven-metadata.xml.md5
@@ -1 +1 @@
-03bdbc77fb87f493473e479111bcdeda
\ No newline at end of file
+919470fe90766da4792e54f44e1a9c9e
\ No newline at end of file
diff --git a/repository/com/xinbida/wukongim/WKIMLib_loca/maven-metadata.xml.sha1 b/repository/com/xinbida/wukongim/WKIMLib_loca/maven-metadata.xml.sha1
index 1a74956..6e64540 100644
--- a/repository/com/xinbida/wukongim/WKIMLib_loca/maven-metadata.xml.sha1
+++ b/repository/com/xinbida/wukongim/WKIMLib_loca/maven-metadata.xml.sha1
@@ -1 +1 @@
-c9a474c48960e99c6818ccf85b7fe4cb6bcdda33
\ No newline at end of file
+5bac2f6f086268d971dbacc7acc8e630cc36c782
\ No newline at end of file
diff --git a/repository/com/xinbida/wukongim/WKIMLib_loca/maven-metadata.xml.sha256 b/repository/com/xinbida/wukongim/WKIMLib_loca/maven-metadata.xml.sha256
index b7393d4..b55f23b 100644
--- a/repository/com/xinbida/wukongim/WKIMLib_loca/maven-metadata.xml.sha256
+++ b/repository/com/xinbida/wukongim/WKIMLib_loca/maven-metadata.xml.sha256
@@ -1 +1 @@
-66e1cbf46da62821fb97f857fd275ad1d6f494e8b5ef6a1fb2cbe7bc05e94b94
\ No newline at end of file
+b9ce184c288fad90ab466510692ce44f41721abcef3509d165b77c54659113da
\ No newline at end of file
diff --git a/repository/com/xinbida/wukongim/WKIMLib_loca/maven-metadata.xml.sha512 b/repository/com/xinbida/wukongim/WKIMLib_loca/maven-metadata.xml.sha512
index f7a7b0a..e082332 100644
--- a/repository/com/xinbida/wukongim/WKIMLib_loca/maven-metadata.xml.sha512
+++ b/repository/com/xinbida/wukongim/WKIMLib_loca/maven-metadata.xml.sha512
@@ -1 +1 @@
-d84c337a857429c67c667ae7e86b20397f4b6188e109a23e751c6fb200a202f3175de0ed1cbd61007425ed4c18ae81cd54ba026f4e3ef61b6093b7883b9b865e
\ No newline at end of file
+9784ddeed1130181483eefe39228c9e70d2eba1026328fb3c9e8cbe8bac018e04fc6ef5c09dc1de840a1875ab6d5d56c67129dca6738adbefcc49e389c056390
\ No newline at end of file
diff --git a/wkim/src/main/java/com/xinbida/wukongim/db/MsgDbManager.java b/wkim/src/main/java/com/xinbida/wukongim/db/MsgDbManager.java
index 4ef3008..7e5dce7 100644
--- a/wkim/src/main/java/com/xinbida/wukongim/db/MsgDbManager.java
+++ b/wkim/src/main/java/com/xinbida/wukongim/db/MsgDbManager.java
@@ -93,15 +93,15 @@ public class MsgDbManager {
//下拉获取消息
if (maxMessageSeq != 0 && oldestMsgSeq != 0 && oldestMsgSeq - maxMessageSeq > 1) {
isSyncMsg = true;
- startMsgSeq = maxMessageSeq;
- endMsgSeq = oldestMsgSeq;
+ startMsgSeq = oldestMsgSeq;
+ endMsgSeq = maxMessageSeq;
}
} else {
//上拉获取消息
if (minMessageSeq != 0 && oldestMsgSeq != 0 && minMessageSeq - oldestMsgSeq > 1) {
isSyncMsg = true;
- startMsgSeq = oldestMsgSeq;
- endMsgSeq = minMessageSeq;
+ startMsgSeq = minMessageSeq;
+ endMsgSeq = oldestMsgSeq;
}
}
@@ -229,7 +229,11 @@ public class MsgDbManager {
sql = "SELECT * FROM (SELECT " + messageCols + "," + extraCols + " FROM " + message + " LEFT JOIN " + messageExtra + " on " + message + ".message_id=" + messageExtra + ".message_id WHERE " + message + ".channel_id='" + channelId + "' and " + message + ".channel_type=" + channelType + " and " + message + ".type<>0 and " + message + ".type<>99) where is_deleted=0 and is_mutual_deleted=0 order by order_seq desc limit 0," + limit;
} else {
if (pullMode == 0) {
- sql = "SELECT * FROM (SELECT " + messageCols + "," + extraCols + " FROM " + message + " LEFT JOIN " + messageExtra + " on " + message + ".message_id=" + messageExtra + ".message_id WHERE " + message + ".channel_id='" + channelId + "' and " + message + ".channel_type=" + channelType + " and " + message + ".type<>0 and " + message + ".type<>99 AND " + message + ".order_seq<" + oldestOrderSeq + ") where is_deleted=0 and is_mutual_deleted=0 order by order_seq desc limit 0," + limit;
+ if (contain) {
+ sql = "SELECT * FROM (SELECT " + messageCols + "," + extraCols + " FROM " + message + " LEFT JOIN " + messageExtra + " on " + message + ".message_id=" + messageExtra + ".message_id WHERE " + message + ".channel_id='" + channelId + "' and " + message + ".channel_type=" + channelType + " and " + message + ".type<>0 and " + message + ".type<>99 AND " + message + ".order_seq<=" + oldestOrderSeq + ") where is_deleted=0 and is_mutual_deleted=0 order by order_seq desc limit 0," + limit;
+ } else {
+ sql = "SELECT * FROM (SELECT " + messageCols + "," + extraCols + " FROM " + message + " LEFT JOIN " + messageExtra + " on " + message + ".message_id=" + messageExtra + ".message_id WHERE " + message + ".channel_id='" + channelId + "' and " + message + ".channel_type=" + channelType + " and " + message + ".type<>0 and " + message + ".type<>99 AND " + message + ".order_seq<" + oldestOrderSeq + ") where is_deleted=0 and is_mutual_deleted=0 order by order_seq desc limit 0," + limit;
+ }
} else {
if (contain) {
sql = "SELECT * FROM (SELECT " + messageCols + "," + extraCols + " FROM " + message + " LEFT JOIN " + messageExtra + " on " + message + ".message_id=" + messageExtra + ".message_id WHERE " + message + ".channel_id='" + channelId + "' and " + message + ".channel_type=" + channelType + " and " + message + ".type<>0 and " + message + ".type<>99 AND " + message + ".order_seq>=" + oldestOrderSeq + ") where is_deleted=0 and is_mutual_deleted=0 order by order_seq asc limit 0," + limit;
diff --git a/wkim/src/main/java/com/xinbida/wukongim/manager/MsgManager.java b/wkim/src/main/java/com/xinbida/wukongim/manager/MsgManager.java
index 056e743..abc2dfa 100644
--- a/wkim/src/main/java/com/xinbida/wukongim/manager/MsgManager.java
+++ b/wkim/src/main/java/com/xinbida/wukongim/manager/MsgManager.java
@@ -295,8 +295,10 @@ public class MsgManager extends BaseManager {
long maxMsgSeq = getMaxMessageSeq(channelId, channelType);
long aroundMsgSeq = getOrNearbyMsgSeq(aroundMsgOrderSeq);
if (maxMsgSeq >= aroundMsgSeq && maxMsgSeq - aroundMsgSeq <= limit) {
- oldestOrderSeq = 0;
- contain = false;
+ // 显示最后一页数据
+// oldestOrderSeq = 0;
+ oldestOrderSeq = getMessageOrderSeq(maxMsgSeq,channelId,channelType);
+ contain = true;
pullMode = 0;
} else {
long minOrderSeq = MsgDbManager.getInstance().getOrderSeq(channelId, channelType, aroundMsgOrderSeq, 3);