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 | 9 +++++----
1 files changed, 5 insertions(+), 4 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 c112e7c..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 courierName, COUNT(*) as count
- FROM packages
- GROUP BY courierName
+ SELECT category as courierName, COUNT(*) as count
+ FROM Code
+ WHERE substr(createtime, 1, 10) = date('now')
+ GROUP BY category
"""
)
data class CourierStat(
val courierName: String,
val count: Int
-)
\ No newline at end of file
+)
--
Gitblit v1.9.3