fix(db): 修复 getHistoricalPositions 中 Drizzle ORM 的 lte 语法调用错误

This commit is contained in:
2026-04-30 11:38:34 +08:00
parent c38d3fe30f
commit 9622e0d828
2 changed files with 9 additions and 3 deletions
+3 -3
View File
@@ -97,7 +97,7 @@ export async function getSnapshots(params?: {
}
if (endDate) {
query = query.where(
portfolioSnapshots.date.lte(endDate)
lte(portfolioSnapshots.date, endDate)
);
}
@@ -125,8 +125,8 @@ export async function getHistoricalPositions(targetDate: Date): Promise<Historic
executedAt: transactions.executedAt,
})
.from(transactions)
.where(
transactions.executedAt.lte(targetDate)
.where(
lte(transactions.executedAt, targetDate)
)
.orderBy(asc(transactions.executedAt));