1
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 26s
Docker Build & Deploy / Deploy to Production (push) Successful in 13s
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 26s
Docker Build & Deploy / Deploy to Production (push) Successful in 13s
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 1s
Docker Build & Deploy / WeChat Notification (push) Successful in 1s
This commit is contained in:
@@ -18,8 +18,6 @@ public interface IBudgetService
|
||||
|
||||
Task<string?> GetArchiveSummaryAsync(int year, int month);
|
||||
|
||||
Task UpdateArchiveSummaryAsync(int year, int month, string? summary);
|
||||
|
||||
/// <summary>
|
||||
/// 获取指定周期的存款预算信息
|
||||
/// </summary>
|
||||
@@ -153,21 +151,6 @@ public class BudgetService(
|
||||
return archive?.Summary;
|
||||
}
|
||||
|
||||
public async Task UpdateArchiveSummaryAsync(int year, int month, string? summary)
|
||||
{
|
||||
var archive = await budgetArchiveRepository.GetArchiveAsync(year, month);
|
||||
if (archive == null)
|
||||
{
|
||||
await ArchiveBudgetsAsync(year, month);
|
||||
archive = await budgetArchiveRepository.GetArchiveAsync(year, month);
|
||||
}
|
||||
|
||||
if (archive != null)
|
||||
{
|
||||
archive.Summary = summary;
|
||||
await budgetArchiveRepository.UpdateAsync(archive);
|
||||
}
|
||||
}
|
||||
|
||||
private async Task<BudgetStatsDto> CalculateCategoryStatsAsync(
|
||||
List<BudgetResult> budgets,
|
||||
@@ -436,6 +419,11 @@ public class BudgetService(
|
||||
content: htmlReport,
|
||||
type: MessageType.Html,
|
||||
url: "/balance?tab=message");
|
||||
|
||||
// 同时保存到归档总结
|
||||
var first = archives.First();
|
||||
first.Summary = htmlReport;
|
||||
await budgetArchiveRepository.UpdateAsync(first);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
Reference in New Issue
Block a user