Add setMaxResults(1) to assure single result in dupe customer query #116

This commit is contained in:
Kendrick Chan 2018-05-20 14:22:51 +08:00
parent 8b8d819910
commit 5498119ab3

View file

@ -233,6 +233,7 @@ class APIController extends Controller
->andWhere('s.customer is not null')
->andWhere('s.confirm_flag = 1')
->setParameter('number', $number)
->setMaxResults(1)
->getQuery();
// we just need one