fix(db): 修复 getHistoricalPositions 中 Drizzle ORM 的 lte 语法调用错误
This commit is contained in:
@@ -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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user