|
|
@@ -18,6 +18,20 @@ class CreditHistoryRepository extends BaseRepository implements DefaultRepositor |
|
|
|
return CreditHistoryInterface::class; |
|
|
|
} |
|
|
|
|
|
|
|
public function findAllByDateStartEnd($merchant, $dateStart, $dateEnd) |
|
|
|
{ |
|
|
|
return $this->createQueryBuilder('e') |
|
|
|
->innerJoin('e.userMerchant', 'user_merchant') |
|
|
|
->andWhere('user_merchant.merchant = :merchant') |
|
|
|
->setParameter(':merchant', $merchant) |
|
|
|
->andWhere('e.createdAt >= :dateStart') |
|
|
|
->andWhere('e.createdAt <= :dateEnd') |
|
|
|
->setParameter(':dateStart', $dateStart) |
|
|
|
->setParameter(':dateEnd', $dateEnd) |
|
|
|
->addOrderBy('e.createdAt', 'ASC') |
|
|
|
->getQuery()->getResult(); |
|
|
|
} |
|
|
|
|
|
|
|
public function findAllByUserMerchant($userMerchant) |
|
|
|
{ |
|
|
|
return $this->createQueryBuilder('e') |