feat: 更新交易记录和预算服务,支持按分类和日期范围筛选
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 26s
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 2s
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 26s
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 2s
This commit is contained in:
@@ -22,29 +22,39 @@ public class TransactionRecordController(
|
||||
[FromQuery] int? type = null,
|
||||
[FromQuery] int? year = null,
|
||||
[FromQuery] int? month = null,
|
||||
[FromQuery] DateTime? startDate = null,
|
||||
[FromQuery] DateTime? endDate = null,
|
||||
[FromQuery] string? reason = null,
|
||||
[FromQuery] bool sortByAmount = false
|
||||
)
|
||||
{
|
||||
try
|
||||
{
|
||||
string[]? classifies = string.IsNullOrWhiteSpace(classify)
|
||||
? null
|
||||
: classify.Split(',', StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
TransactionType? transactionType = type.HasValue ? (TransactionType)type.Value : null;
|
||||
var list = await transactionRepository.GetPagedListAsync(
|
||||
pageIndex,
|
||||
pageSize,
|
||||
searchKeyword,
|
||||
classify,
|
||||
classifies,
|
||||
transactionType,
|
||||
year,
|
||||
month,
|
||||
startDate,
|
||||
endDate,
|
||||
reason,
|
||||
sortByAmount);
|
||||
var total = await transactionRepository.GetTotalCountAsync(
|
||||
searchKeyword,
|
||||
classify,
|
||||
classifies,
|
||||
transactionType,
|
||||
year,
|
||||
month,
|
||||
startDate,
|
||||
endDate,
|
||||
reason);
|
||||
|
||||
return new PagedResponse<TransactionRecord>
|
||||
|
||||
Reference in New Issue
Block a user