Files
EmailBill/Repository/BudgetArchiveRepository.cs
孙诚 556fc5af20
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 34s
Docker Build & Deploy / Deploy to Production (push) Successful in 9s
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 1s
Docker Build & Deploy / WeChat Notification (push) Successful in 1s
更新预算归档功能,添加归档总结和更新归档总结接口,优化预算统计逻辑,调整相关样式
2026-01-12 22:29:39 +08:00

28 lines
848 B
C#

namespace Repository;
public interface IBudgetArchiveRepository : IBaseRepository<BudgetArchive>
{
Task<BudgetArchive?> GetArchiveAsync(int year, int month);
Task<List<BudgetArchive>> GetListAsync(int year, int month);
}
public class BudgetArchiveRepository(
IFreeSql freeSql
) : BaseRepository<BudgetArchive>(freeSql), IBudgetArchiveRepository
{
public async Task<BudgetArchive?> GetArchiveAsync(int year, int month)
{
return await FreeSql.Select<BudgetArchive>()
.Where(a => a.Year == year &&
a.Month == month)
.ToOneAsync();
}
public async Task<List<BudgetArchive>> GetListAsync(int year, int month)
{
return await FreeSql.Select<BudgetArchive>()
.Where(a => a.Year == year && a.Month == month)
.ToListAsync();
}
}