更新预算归档功能,添加归档总结和更新归档总结接口,优化预算统计逻辑,调整相关样式
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
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
This commit is contained in:
@@ -2,7 +2,8 @@
|
||||
|
||||
public interface IBudgetArchiveRepository : IBaseRepository<BudgetArchive>
|
||||
{
|
||||
Task<BudgetArchive?> GetArchiveAsync(long budgetId, int year, int month);
|
||||
Task<BudgetArchive?> GetArchiveAsync(int year, int month);
|
||||
|
||||
Task<List<BudgetArchive>> GetListAsync(int year, int month);
|
||||
}
|
||||
|
||||
@@ -10,11 +11,10 @@ public class BudgetArchiveRepository(
|
||||
IFreeSql freeSql
|
||||
) : BaseRepository<BudgetArchive>(freeSql), IBudgetArchiveRepository
|
||||
{
|
||||
public async Task<BudgetArchive?> GetArchiveAsync(long budgetId, int year, int month)
|
||||
public async Task<BudgetArchive?> GetArchiveAsync(int year, int month)
|
||||
{
|
||||
return await FreeSql.Select<BudgetArchive>()
|
||||
.Where(a => a.BudgetId == budgetId &&
|
||||
a.Year == year &&
|
||||
.Where(a => a.Year == year &&
|
||||
a.Month == month)
|
||||
.ToOneAsync();
|
||||
}
|
||||
@@ -22,13 +22,7 @@ public class BudgetArchiveRepository(
|
||||
public async Task<List<BudgetArchive>> GetListAsync(int year, int month)
|
||||
{
|
||||
return await FreeSql.Select<BudgetArchive>()
|
||||
.Where(
|
||||
a => a.BudgetType == BudgetPeriodType.Month &&
|
||||
a.Year == year &&
|
||||
a.Month == month ||
|
||||
a.BudgetType == BudgetPeriodType.Year &&
|
||||
a.Year == year
|
||||
)
|
||||
.Where(a => a.Year == year && a.Month == month)
|
||||
.ToListAsync();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user