fix:修复注释错误

This commit is contained in:
2026-01-04 21:22:26 +08:00
parent a427b0f22a
commit 398c716734
69 changed files with 353 additions and 318 deletions

View File

@@ -33,13 +33,13 @@ public sealed class GetBillingListQueryHandler(
var maxAmount = request.MaxAmount;
var offset = (page - 1) * pageSize;
// 1.1 (空行后) 金额区间规范化(避免 min > max 导致结果为空)
// 1.1 金额区间规范化(避免 min > max 导致结果为空)
if (minAmount.HasValue && maxAmount.HasValue && minAmount.Value > maxAmount.Value)
{
(minAmount, maxAmount) = (maxAmount, minAmount);
}
// 2. (空行后) 排序白名单(防 SQL 注入)
// 2. 排序白名单(防 SQL 注入)
var orderBy = request.SortBy?.Trim() switch
{
"DueDate" => "b.\"DueDate\"",
@@ -50,7 +50,7 @@ public sealed class GetBillingListQueryHandler(
_ => "b.\"CreatedAt\""
};
// 3. (空行后) 查询总数 + 列表
// 3. 查询总数 + 列表
return await dapperExecutor.QueryAsync(
DatabaseConstants.AppDataSource,
DatabaseConnectionRole.Read,
@@ -72,7 +72,7 @@ public sealed class GetBillingListQueryHandler(
],
token);
// 3.2 (空行后) 查询列表
// 3.2 查询列表
var listSql = BuildListSql(orderBy, request.SortDesc);
await using var listCommand = CreateCommand(
connection,
@@ -102,7 +102,7 @@ public sealed class GetBillingListQueryHandler(
var taxAmount = reader.GetDecimal(10);
var totalAmount = amountDue - discountAmount + taxAmount;
// 3.2.1 (空行后) 逾期辅助字段
// 3.2.1 逾期辅助字段
var isOverdue = status is TenantBillingStatus.Overdue
|| (status is TenantBillingStatus.Pending && dueDate < now);
var overdueDays = dueDate < now ? (int)(now - dueDate).TotalDays : 0;
@@ -132,7 +132,7 @@ public sealed class GetBillingListQueryHandler(
});
}
// 3.3 (空行后) 返回分页
// 3.3 返回分页
return new PagedResult<BillingListDto>(items, page, pageSize, total);
},
cancellationToken);