Skip to content

Commit

Permalink
fix query filter condition
Browse files Browse the repository at this point in the history
  • Loading branch information
bahram1249 committed May 22, 2024
1 parent 7a74d25 commit 6cfb75c
Showing 1 changed file with 21 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,27 +192,27 @@ export class ProductDiscountSetterService {
required: true,
},
])
.filter(
Sequelize.where(
Sequelize.fn(
'isnull',
Sequelize.col('ECDiscount.startDate'),
Sequelize.fn('getdate'),
),
{
[Op.between]: [
Sequelize.fn('getdate'),
// we check only start date
Sequelize.fn(
'dateadd',
Sequelize.literal('day'),
Sequelize.literal('1'),
Sequelize.fn('getdate'),
),
],
},
),
)
// .filter(
// Sequelize.where(
// Sequelize.fn(
// 'isnull',
// Sequelize.col('ECDiscount.startDate'),
// Sequelize.fn('getdate'),
// ),
// {
// [Op.between]: [
// Sequelize.fn('getdate'),
// // we check only start date
// Sequelize.fn(
// 'dateadd',
// Sequelize.literal('day'),
// Sequelize.literal('1'),
// Sequelize.fn('getdate'),
// ),
// ],
// },
// ),
// )
.filter(
Sequelize.where(Sequelize.fn('getdate'), {
[Op.lte]: Sequelize.fn(
Expand Down

0 comments on commit 6cfb75c

Please sign in to comment.