cloudroam
2 天以前 9755d9eefb12f95fa45c785e526038e10c9c7115
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,8 @@
        WHERE category = :category 
        AND code = :code 
        AND substr(createTime, 1, 10) = substr(:dateString, 1, 10)
        ANd pickup = '0'
        ORDER BY createTime DESC
        LIMIT 1
    """)
    fun queryByTypeAndCodeAndDate(category: String, code: String, dateString: String): Code?