From b653b90d4598ee2a65bceffa793bb75353b6d186 Mon Sep 17 00:00:00 2001
From: cloudroam <cloudroam>
Date: 星期三, 26 二月 2025 17:21:53 +0800
Subject: [PATCH] add: 快递列表展示
---
app/src/main/java/com/example/firstapp/database/dao/CodeDao.kt | 7 +++++++
1 files changed, 7 insertions(+), 0 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 8df5a2b..64e658e 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
@@ -41,4 +41,11 @@
@Query("SELECT * FROM Code order by time desc")
abstract fun getAllCodesDesc(): List<Code>
+
+ @Query("""
+ SELECT * FROM Code
+ WHERE type LIKE '%' || :keyword || '%'
+ ORDER BY time DESC
+ """)
+ fun getByKeyword(keyword: String): List<Code>
}
--
Gitblit v1.9.3