-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathBigSpendersProcessor.php
77 lines (67 loc) · 1.78 KB
/
BigSpendersProcessor.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?php
namespace Lof\Mautic\Queue\Processor\Segments;
use Magento\Framework\Api\SearchCriteriaBuilder;
use Magento\Framework\Api\SortOrderBuilder;
use Magento\Framework\Event\ManagerInterface;
use Magento\Store\Model\StoreManager;
use Magento\Reports\Model\ResourceModel\Quote\CollectionFactory;
use Lof\Mautic\Model\Mautic\Contact;
use Lof\Mautic\Helper\Data;
use Lof\Mautic\Model\Mautic\AbstractApi;
use Lof\Mautic\Queue\MessageQueues\Order\Publisher;
use Lof\Mautic\Queue\Processor\AbstractQueueProcessor;
/**
* Class BigSpendersProcessor
* Find best customers from reports and add to segement name "Best Customers"
*/
class BigSpendersProcessor extends AbstractQueueProcessor
{
/**
* @var array
*/
protected $customergroups = [];
/**
* @var string|null
*/
protected $firstdate = null;
/**
* @var Publisher
*/
private $publisher;
/**
* @var CollectionFactory
*/
protected $collectionFactory;
/**
* @var StoreManager
*/
protected $_storeManager;
/**
* CategoryImport constructor.
*
* @param Contact $mauticContact
* @param Data $helperData
* @param CollectionFactory $collectionFactory
* @param Publisher $publisher
* @param StoreManager $storeManager
*/
public function __construct(
Contact $mauticContact,
Data $helperData,
CollectionFactory $collectionFactory,
Publisher $publisher,
StoreManager $storeManager
) {
parent::__construct($mauticContact, $helperData);
$this->collectionFactory = $collectionFactory;
$this->publisher = $publisher;
$this->_storeManager = $storeManager;
}
/**
* @return void
*/
public function process()
{
//Write code at here
}
}