From a69ed0d5eed84bea789463e718a2774122348685 Mon Sep 17 00:00:00 2001 From: cloudroam <cloudroam> Date: 星期四, 27 二月 2025 17:55:22 +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