样式统一
Some checks failed
Docker Build & Deploy / Build Docker Image (push) Failing after 6s
Docker Build & Deploy / Deploy to Production (push) Has been skipped

This commit is contained in:
孙诚
2025-12-30 17:02:30 +08:00
parent 8ba279e957
commit 1f01d13ed3
15 changed files with 1528 additions and 929 deletions

View File

@@ -16,6 +16,7 @@ public interface ITransactionRecordRepository : IBaseRepository<TransactionRecor
/// <param name="type">筛选交易类型</param>
/// <param name="year">筛选年份</param>
/// <param name="month">筛选月份</param>
/// <param name="reason">筛选交易摘要</param>
/// <param name="sortByAmount">是否按金额降序排列默认为false按时间降序</param>
/// <returns>交易记录列表</returns>
Task<List<TransactionRecord>> GetPagedListAsync(
@@ -26,6 +27,7 @@ public interface ITransactionRecordRepository : IBaseRepository<TransactionRecor
TransactionType? type = null,
int? year = null,
int? month = null,
string? reason = null,
bool sortByAmount = false);
/// <summary>
@@ -36,7 +38,8 @@ public interface ITransactionRecordRepository : IBaseRepository<TransactionRecor
string? classify = null,
TransactionType? type = null,
int? year = null,
int? month = null);
int? month = null,
string? reason = null);
/// <summary>
/// 获取所有不同的交易分类
@@ -192,6 +195,7 @@ public class TransactionRecordRepository(IFreeSql freeSql) : BaseRepository<Tran
TransactionType? type = null,
int? year = null,
int? month = null,
string? reason = null,
bool sortByAmount = false)
{
var query = FreeSql.Select<TransactionRecord>();
@@ -201,7 +205,9 @@ public class TransactionRecordRepository(IFreeSql freeSql) : BaseRepository<Tran
t => t.Reason.Contains(searchKeyword!) ||
t.Classify.Contains(searchKeyword!) ||
t.Card.Contains(searchKeyword!) ||
t.ImportFrom.Contains(searchKeyword!));
t.ImportFrom.Contains(searchKeyword!))
.WhereIf(!string.IsNullOrWhiteSpace(reason),
t => t.Reason == reason);
// 按分类筛选
if (!string.IsNullOrWhiteSpace(classify))
@@ -250,7 +256,8 @@ public class TransactionRecordRepository(IFreeSql freeSql) : BaseRepository<Tran
string? classify = null,
TransactionType? type = null,
int? year = null,
int? month = null)
int? month = null,
string? reason = null)
{
var query = FreeSql.Select<TransactionRecord>();
@@ -259,7 +266,9 @@ public class TransactionRecordRepository(IFreeSql freeSql) : BaseRepository<Tran
t => t.Reason.Contains(searchKeyword!) ||
t.Classify.Contains(searchKeyword!) ||
t.Card.Contains(searchKeyword!) ||
t.ImportFrom.Contains(searchKeyword!));
t.ImportFrom.Contains(searchKeyword!))
.WhereIf(!string.IsNullOrWhiteSpace(reason),
t => t.Reason == reason);
// 按分类筛选
if (!string.IsNullOrWhiteSpace(classify))