|
|
|
@@ -26,6 +26,7 @@ class UseSummaryRepository extends BaseRepository |
|
|
|
|
|
|
|
protected Carbon $dateFrom; |
|
|
|
protected Carbon $dateTo; |
|
|
|
protected Carbon $dateToOrigin; |
|
|
|
|
|
|
|
/** |
|
|
|
* コレクションを取得する |
|
|
|
@@ -49,8 +50,9 @@ class UseSummaryRepository extends BaseRepository |
|
|
|
if (!($dateFrom instanceof Carbon) || !($dateTo instanceof Carbon)) { |
|
|
|
throw new AppCommonException('検索日付不正'); |
|
|
|
} |
|
|
|
$this->dateFrom = $dateFrom; |
|
|
|
$this->dateTo = $dateTo->addDay(); |
|
|
|
$this->dateFrom = $dateFrom->clone(); |
|
|
|
$this->dateToOrigin = $dateTo->clone(); |
|
|
|
$this->dateTo = $dateTo->clone()->addDay(); |
|
|
|
|
|
|
|
$target = ReceiptIssuingOrder::getBuilder(self::TABLE_TARGET); |
|
|
|
|
|
|
|
@@ -137,7 +139,7 @@ class UseSummaryRepository extends BaseRepository |
|
|
|
$summary = self::TABLE_SUMMARY; |
|
|
|
$columns = [ |
|
|
|
SelectQueryUtil::value($this->dateFrom->format('Y/m/d'), 'date_from'), |
|
|
|
SelectQueryUtil::value($this->dateTo->format('Y/m/d'), 'date_to'), |
|
|
|
SelectQueryUtil::value($this->dateToOrigin->format('Y/m/d'), 'date_to'), |
|
|
|
SelectQueryUtil::select([$summary, 'receipt_order_count'])->build(), |
|
|
|
SelectQueryUtil::select([$summary, 'mail_order_count'])->build(), |
|
|
|
SelectQueryUtil::select([$sms, 'sms_send_count'])->nullValue(0)->build(), |
|
|
|
|