Add a button for recalculating score
[MAILPOET-3525]
This commit is contained in:
@ -47,4 +47,11 @@ class StatisticsOpensRepository extends Repository {
|
||||
$subscriber->setEngagementScore($score);
|
||||
$this->entityManager->flush();
|
||||
}
|
||||
|
||||
public function resetSubscribersScoreCalculation() {
|
||||
$this->entityManager->createQueryBuilder()->update(SubscriberEntity::class, 's')
|
||||
->set('s.engagementScoreUpdatedAt', ':verified')
|
||||
->setParameter('verified', null)
|
||||
->getQuery()->execute();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user