fix: 查询10天bug

This commit is contained in:
cll 2025-08-30 09:46:33 +08:00
parent 6c65f5be85
commit c55eefa3de
1 changed files with 1 additions and 1 deletions

View File

@ -632,7 +632,7 @@ export class OrderService {
totalQuery += ` AND o.date_created <= ?`;
parameters.push(endDate);
}
const user = await this.userModel.findOneBy(userId);
const user = await this.userModel.findOneBy({id: userId});
if (user?.permissions?.includes('order-10-days')) {
sqlQuery += ` AND o.date_created >= ?`;
totalQuery += ` AND o.date_created >= ?`;