From e3783b167f132005c7afcc4c10f9ab167806331d Mon Sep 17 00:00:00 2001
From: cloudroam <cloudroam>
Date: 星期二, 04 三月 2025 13:22:04 +0800
Subject: [PATCH] fix: 按天统计相关逻辑
---
app/src/main/java/com/example/firstapp/model/CourierStat.kt | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/app/src/main/java/com/example/firstapp/model/CourierStat.kt b/app/src/main/java/com/example/firstapp/model/CourierStat.kt
index 8abab2c..fe385fe 100644
--- a/app/src/main/java/com/example/firstapp/model/CourierStat.kt
+++ b/app/src/main/java/com/example/firstapp/model/CourierStat.kt
@@ -4,12 +4,13 @@
@DatabaseView(
"""
- SELECT category, COUNT(*) as count
+ SELECT category as courierName, COUNT(*) as count
FROM Code
+ WHERE substr(createtime, 1, 10) = date('now')
GROUP BY category
"""
)
data class CourierStat(
- val category: String,
+ val courierName: String,
val count: Int
-)
\ No newline at end of file
+)
--
Gitblit v1.9.3