From 2309f454c0e1df3c43fde66002a1d009c0b8f479 Mon Sep 17 00:00:00 2001 From: cloudroam <cloudroam> Date: 星期二, 01 四月 2025 11:34:35 +0800 Subject: [PATCH] add : 收入逻辑 --- app/src/main/java/com/example/firstapp/database/repository/CodeRepository.kt | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/app/src/main/java/com/example/firstapp/database/repository/CodeRepository.kt b/app/src/main/java/com/example/firstapp/database/repository/CodeRepository.kt index 915c13d..c7ccd88 100644 --- a/app/src/main/java/com/example/firstapp/database/repository/CodeRepository.kt +++ b/app/src/main/java/com/example/firstapp/database/repository/CodeRepository.kt @@ -3,6 +3,7 @@ import androidx.annotation.WorkerThread import com.example.firstapp.database.dao.CodeDao import com.example.firstapp.database.entity.Code +import com.example.firstapp.model.StationGroup import kotlinx.coroutines.flow.Flow @@ -70,4 +71,19 @@ fun getYearMonthlyStats(date: Long) = codeDao.getYearMonthlyStats(date) + + fun getCurrentWeekStats(date: Long) = codeDao.getCurrentWeekStats(date) + + fun getCurrentYearStats(date: Long) = codeDao.getCurrentYearStats(date) + + @WorkerThread + fun getStationsByType(type: String): List<StationGroup> { + return codeDao.getStationsByType(type) + } + + @WorkerThread + fun getPackagesByTypeAndStation(type: String, stationName: String): List<Code> { + return codeDao.getPackagesByTypeAndStation(type, stationName) + } + } \ No newline at end of file -- Gitblit v1.9.3