fix
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 4m27s
Docker Build & Deploy / Deploy to Production (push) Successful in 7s
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 1s
Docker Build & Deploy / WeChat Notification (push) Successful in 1s

This commit is contained in:
SunCheng
2026-02-11 13:00:01 +08:00
parent ca3e929770
commit 51172e8c5a
88 changed files with 10076 additions and 142 deletions

View File

@@ -0,0 +1,32 @@
namespace Application.Dto;
/// <summary>
/// 节假日数据传输对象
/// </summary>
public class HolidayDto
{
/// <summary>
/// 日期yyyy-MM-dd格式
/// </summary>
public string Date { get; set; } = string.Empty;
/// <summary>
/// 节假日名称(如:春节、国庆节)
/// </summary>
public string HolidayName { get; set; } = string.Empty;
/// <summary>
/// 日期类型1=节假日放假3=调休工作日
/// </summary>
public int DayType { get; set; }
/// <summary>
/// 是否休息1=休息0=工作
/// </summary>
public int Rest { get; set; }
/// <summary>
/// 星期描述(中文)
/// </summary>
public string WeekDescCn { get; set; } = string.Empty;
}

View File

@@ -41,8 +41,7 @@ public class EmailMessageApplication(
IEmailMessageRepository emailRepository,
ITransactionRecordRepository transactionRepository,
IEmailHandleService emailHandleService,
IEmailSyncService emailSyncService,
ILogger<EmailMessageApplication> logger
IEmailSyncService emailSyncService
) : IEmailMessageApplication
{
public async Task<EmailPagedResult> GetListAsync(EmailQueryRequest request)

View File

@@ -29,6 +29,11 @@ public static class ServiceCollectionExtensions
{
services.AddScoped(interfaceType, implementationType);
}
else
{
// 如果没有接口,直接注册实现类
services.AddScoped(implementationType);
}
}
return services;

View File

@@ -0,0 +1,35 @@
namespace Application;
/// <summary>
/// 节假日应用服务
/// </summary>
public class HolidayApplication(IHolidayService holidayService)
{
/// <summary>
/// 获取指定年月的节假日数据
/// </summary>
public async Task<List<HolidayDto>> GetMonthHolidaysAsync(int year, int month)
{
var startDate = new DateTime(year, month, 1).ToString("yyyy-MM-dd");
var endDate = new DateTime(year, month, DateTime.DaysInMonth(year, month)).ToString("yyyy-MM-dd");
var holidays = await holidayService.GetHolidaysByDateRangeAsync(startDate, endDate);
return holidays.Select(h => new HolidayDto
{
Date = h.Date,
HolidayName = h.HolidayName,
DayType = h.DayType,
Rest = h.Rest,
WeekDescCn = h.WeekDescCn
}).ToList();
}
/// <summary>
/// 手动触发同步节假日数据
/// </summary>
public async Task<bool> SyncHolidaysAsync(int year)
{
return await holidayService.FetchAndCacheHolidaysAsync(year);
}
}

View File

@@ -30,8 +30,7 @@ public interface IJobApplication
/// 任务应用服务实现
/// </summary>
public class JobApplication(
ISchedulerFactory schedulerFactory,
ILogger<JobApplication> logger
ISchedulerFactory schedulerFactory
) : IJobApplication
{
public async Task<List<JobStatus>> GetJobsAsync()

View File

@@ -43,8 +43,7 @@ public interface IMessageRecordApplication
/// 消息记录应用服务实现
/// </summary>
public class MessageRecordApplication(
IMessageService messageService,
ILogger<MessageRecordApplication> logger
IMessageService messageService
) : IMessageRecordApplication
{
public async Task<MessagePagedResult> GetListAsync(int pageIndex = 1, int pageSize = 20)

View File

@@ -16,8 +16,7 @@ public interface INotificationApplication
/// 通知应用服务实现
/// </summary>
public class NotificationApplication(
INotificationService notificationService,
ILogger<NotificationApplication> logger
INotificationService notificationService
) : INotificationApplication
{
public async Task<string> GetVapidPublicKeyAsync()

View File

@@ -99,8 +99,7 @@ public interface ITransactionApplication
/// </summary>
public class TransactionApplication(
ITransactionRecordRepository transactionRepository,
ISmartHandleService smartHandleService,
ILogger<TransactionApplication> logger
ISmartHandleService smartHandleService
) : ITransactionApplication
{
public async Task<PagedResult<TransactionResponse>> GetListAsync(TransactionQueryRequest request)

View File

@@ -26,8 +26,7 @@ public class TransactionCategoryApplication(
ITransactionCategoryRepository categoryRepository,
ITransactionRecordRepository transactionRepository,
IBudgetRepository budgetRepository,
ISmartHandleService smartHandleService,
ILogger<TransactionCategoryApplication> logger
ISmartHandleService smartHandleService
) : ITransactionCategoryApplication
{
public async Task<List<CategoryResponse>> GetListAsync(TransactionType? type = null)

View File

@@ -44,8 +44,7 @@ public interface ITransactionPeriodicApplication
/// </summary>
public class TransactionPeriodicApplication(
ITransactionPeriodicRepository periodicRepository,
ITransactionPeriodicService periodicService,
ILogger<TransactionPeriodicApplication> logger
ITransactionPeriodicService periodicService
) : ITransactionPeriodicApplication
{
public async Task<PeriodicPagedResult> GetListAsync(int pageIndex = 1, int pageSize = 20, string? searchKeyword = null)

View File

@@ -61,8 +61,7 @@ public interface ITransactionStatisticsApplication
/// </summary>
public class TransactionStatisticsApplication(
ITransactionStatisticsService statisticsService,
IConfigService configService,
ILogger<TransactionStatisticsApplication> logger
IConfigService configService
) : ITransactionStatisticsApplication
{
// === 新统一接口实现 ===