统计样式微调
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 19s
Docker Build & Deploy / Deploy to Production (push) Successful in 5s

This commit is contained in:
孙诚
2025-12-26 17:56:08 +08:00
parent c0264faca5
commit 5e23c38df4
3 changed files with 331 additions and 14 deletions

View File

@@ -18,12 +18,25 @@ public class TransactionRecordController(
public async Task<PagedResponse<Entity.TransactionRecord>> GetListAsync(
[FromQuery] DateTime? lastOccurredAt = null,
[FromQuery] long? lastId = null,
[FromQuery] string? searchKeyword = null
[FromQuery] string? searchKeyword = null,
[FromQuery] string? classify = null,
[FromQuery] int? type = null,
[FromQuery] int? year = null,
[FromQuery] int? month = null
)
{
try
{
var (list, lastTime, lastIdResult) = await transactionRepository.GetPagedListAsync(lastOccurredAt, lastId, 20, searchKeyword);
TransactionType? transactionType = type.HasValue ? (TransactionType)type.Value : null;
var (list, lastTime, lastIdResult) = await transactionRepository.GetPagedListAsync(
lastOccurredAt,
lastId,
20,
searchKeyword,
classify,
transactionType,
year,
month);
var total = await transactionRepository.GetTotalCountAsync();
return new PagedResponse<Entity.TransactionRecord>