public function handle(ConditionInterface
$condition, QueryBuilder
$query): void
{ $this->
addCondition($condition,
$query);
} private function addCondition(NotOrderedInLastDaysCondition
$condition, QueryBuilder
$query): void
{ $query->
andWhere('customer.last_order_time <= :NotOrderedInLastDaysCondition'
);
$date =
new DateTime();
$date->
sub(new DateInterval('P' .
$condition->
getLastDays() . 'D'
));
$query->
setParameter(':NotOrderedInLastDaysCondition',
$date->
format('Y-m-d H:i:s'
));
}}