From fd8d0ed1538563d9881a8ce929b3921880b6bb0e Mon Sep 17 00:00:00 2001
From: shuaikangzhou <863909694@qq.com>
Date: Fri, 17 Nov 2023 23:59:52 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=81=8A=E5=A4=A9=E8=AE=B0?=
=?UTF-8?q?=E5=BD=95=E6=98=BE=E7=A4=BA=E9=A1=BA=E5=BA=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.idea/workspace.xml | 29 +++++++++++------------------
app/DataBase/msg.py | 3 ++-
2 files changed, 13 insertions(+), 19 deletions(-)
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index dde2923..6e806e5 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,15 +4,8 @@
-
-
-
+
-
-
-
-
-
@@ -278,13 +271,6 @@
1672848140146
-
- 1684599002132
-
-
-
- 1684599002132
-
1684599566617
@@ -621,7 +607,14 @@
1700233361985
-
+
+ 1700236486745
+
+
+
+ 1700236486745
+
+
@@ -657,7 +650,6 @@
-
@@ -682,7 +674,8 @@
-
+
+
diff --git a/app/DataBase/msg.py b/app/DataBase/msg.py
index b720791..6ddfaa4 100644
--- a/app/DataBase/msg.py
+++ b/app/DataBase/msg.py
@@ -61,7 +61,7 @@ def get_message_by_num(username_, n):
select localId,TalkerId,Type,SubType,IsSender,CreateTime,Status,StrContent,strftime('%Y-%m-%d %H:%M:%S',CreateTime,'unixepoch','localtime') as StrTime
from MSG
where StrTalker=?
- order by CreateTime
+ order by CreateTime desc
limit 100
'''
result = []
@@ -71,6 +71,7 @@ def get_message_by_num(username_, n):
cur = cursor[-1]
cur.execute(sql, [username_])
result_ = cur.fetchall()
+ result_.reverse()
result += result_
return result_
finally: