From 1a281d8354622a3606360f9f9a7fe4bb7d6a2c3a Mon Sep 17 00:00:00 2001
From: cloudroam <cloudroam>
Date: 星期日, 27 四月 2025 13:22:26 +0800
Subject: [PATCH] fix 短信

---
 app/src/main/java/com/example/firstapp/database/dao/CodeDao.kt |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/app/src/main/java/com/example/firstapp/database/dao/CodeDao.kt b/app/src/main/java/com/example/firstapp/database/dao/CodeDao.kt
index e63ba6a..963769c 100644
--- a/app/src/main/java/com/example/firstapp/database/dao/CodeDao.kt
+++ b/app/src/main/java/com/example/firstapp/database/dao/CodeDao.kt
@@ -54,7 +54,7 @@
         SELECT * FROM Code 
         WHERE oneLevel LIKE '%' || :keyword || '%' 
         AND pickup = '0'
-        ORDER BY time DESC
+        ORDER BY createTime DESC
     """)
     fun getByKeyword(keyword: String): List<Code>
 
@@ -63,6 +63,7 @@
         WHERE category = :category 
         AND code = :code 
         AND substr(createTime, 1, 10) = substr(:dateString, 1, 10)
+        ORDER BY createTime DESC
         LIMIT 1
     """)
     fun queryByTypeAndCodeAndDate(category: String, code: String, dateString: String): Code?

--
Gitblit v1.9.3