Skip to content

Commit b46bc70

Browse files
committed
Added used, to batch query
1 parent 3b87c42 commit b46bc70

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Repository/SmartCodeRepository.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public function findAllBatchesForPayload(PayloadInterface $payload)
1111
{
1212
return $this->getEntityManager()
1313
->createQuery(
14-
'SELECT sc.batch, sc.createdAt, sc.usageLimit, sc.startsAt, sc.expiresAt, count(sc.id) as total
14+
'SELECT sc.batch, sc.createdAt, sc.usageLimit, sc.startsAt, sc.expiresAt, count(sc.id) as total, sum(sc.used) as used
1515
FROM SmartCodeBundle:SmartCode sc
1616
WHERE sc.payload = :payload
1717
GROUP BY sc.batch
@@ -35,4 +35,4 @@ public function findAllByBatch($batch, PayloadInterface $payload)
3535
->setParameter('batch', $batch)
3636
->getResult();
3737
}
38-
}
38+
}

0 commit comments

Comments
 (0)